Fix Makefile

This commit is contained in:
Michael Moon 2012-04-11 11:37:55 +10:00
parent cf7c8c458f
commit 77d503fa13

View file

@ -112,8 +112,8 @@ CDEFS = -DF_CPU=$(F_CPU)
CXXDEFS = -DF_CPU=$(F_CPU) CXXDEFS = -DF_CPU=$(F_CPU)
# Add all the source directories as include directories too # Add all the source directories as include directories too
CINCS = ${patsubst %,-I%,${subst :, ,${VPATH}}} CINCS = ${addprefix -I ,${VPATH}}
CXXINCS = ${patsubst %,-I%,${subst :, ,${VPATH}}} CXXINCS = ${addprefix -I ,${VPATH}}
# Compiler flag to set the C Standard level. # Compiler flag to set the C Standard level.
# c89 - "ANSI" C # c89 - "ANSI" C
@ -185,7 +185,7 @@ applet:
# ..and the .o depends from the .cpp # ..and the .o depends from the .cpp
#applet/%.o: applet/%.cpp #applet/%.o: applet/%.cpp
applet/%.cpp: %.pde applet/%.cpp: %.pde $(MAKEFILE)
# Here is the "preprocessing". # Here is the "preprocessing".
# It creates a .cpp file based with the same name as the .pde file. # It creates a .cpp file based with the same name as the .pde file.
# On top of the new .cpp file comes the WProgram.h header. # On top of the new .cpp file comes the WProgram.h header.
@ -264,16 +264,11 @@ applet/$(TARGET).elf: applet/$(TARGET).cpp applet/core.a Configuration.h
applet/core.a: $(OBJ) applet/core.a: $(OBJ)
@for i in $(OBJ); do echo " AR $$i"; $(AR) rcs applet/core.a $$i; done @for i in $(OBJ); do echo " AR $$i"; $(AR) rcs applet/core.a $$i; done
applet/%.o: %.c applet/%.o: %.c Configuration.h Configuration_adv.h $(MAKEFILE)
@echo " CC $@" @echo " CC $@"
@$(CC) -MMD -c $(ALL_CFLAGS) $< -o $@ @$(CC) -MMD -c $(ALL_CFLAGS) $< -o $@
applet/%.o: %.cpp applet/%.o: %.cpp Configuration.h Configuration_adv.h $(MAKEFILE)
@echo " CXX $@"
@$(CXX) -MMD -c $(ALL_CXXFLAGS) $< -o $@
# special rule for autogenerated files...
applet/%.o: applet/%.cpp
@echo " CXX $@" @echo " CXX $@"
@$(CXX) -MMD -c $(ALL_CXXFLAGS) $< -o $@ @$(CXX) -MMD -c $(ALL_CXXFLAGS) $< -o $@