Created
August 30, 2011 16:44
Customized libmaple build-targets.mk file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TARGET_MAIN = main-BarWave | |
OBJECTS = $(BUILD_PATH)/LCD/LCD_Driver.o \ | |
$(BUILD_PATH)/LCD/LCD_Graphics.o \ | |
$(BUILD_PATH)/LCD/LCD_Font.o \ | |
$(BUILD_PATH)/LCD/LCD_Touch.o \ | |
$(BUILD_PATH)/LCD/LCD_Utils.o \ | |
$(BUILD_PATH)/SPIHelper.o \ | |
$(BUILD_PATH)/libfixmath/fix16_trig.o \ | |
$(BUILD_PATH)/libfixmath/fix16_sqrt.o \ | |
$(BUILD_PATH)/libfixmath/fix16_exp.o \ | |
$(BUILD_PATH)/libfixmath/fix16.o \ | |
$(BUILD_PATH)/FFT/FFTCM3.o \ | |
$(BUILD_PATH)/LPD8806/LPD8806.o | |
BUILDDIRS += $(BUILD_PATH)/LCD \ | |
$(BUILD_PATH)/libfixmath \ | |
$(BUILD_PATH)/LPD8806/ \ | |
$(BUILD_PATH)/FFT/ | |
# main project target | |
$(BUILD_PATH)/$(TARGET_MAIN).o: $(TARGET_MAIN).cpp | |
$(SILENT_CXX) $(CXX) $(CFLAGS) $(CXXFLAGS) $(LIBMAPLE_INCLUDES) $(WIRISH_INCLUDES) -I/ -o $@ -c $< | |
# Helpers | |
$(BUILD_PATH)/SPIHelper.o: SPIHelper.c | |
$(SILENT_CXX) $(CXX) $(CFLAGS) $(CXXFLAGS) $(LIBMAPLE_INCLUDES) $(WIRISH_INCLUDES) -I/ -o $@ -c $< | |
$(BUILD_PATH)/FFT/FFTCM3.o: FFT/FFTCM3.s | |
$(SILENT_AS) $(AS) $(ASFLAGS) $(LIBMAPLE_INCLUDES) $(WIRISH_INCLUDES) -I/ -o $@ -c $< | |
$(BUILD_PATH)/LPD8806/LPD8806.o: LPD8806/LPD8806.cpp | |
$(SILENT_CXX) $(CXX) $(CFLAGS) $(CXXFLAGS) $(LIBMAPLE_INCLUDES) $(WIRISH_INCLUDES) -I/ -o $@ -c $< | |
# LCD Driver | |
$(BUILD_PATH)/LCD/LCD_Driver.o: LCD/LCD_Driver.c | |
$(SILENT_CXX) $(CXX) $(CFLAGS) $(CXXFLAGS) $(LIBMAPLE_INCLUDES) $(WIRISH_INCLUDES) -I/ -o $@ -c $< | |
$(BUILD_PATH)/LCD/LCD_Graphics.o: LCD/LCD_Graphics.c | |
$(SILENT_CXX) $(CXX) $(CFLAGS) $(CXXFLAGS) $(LIBMAPLE_INCLUDES) $(WIRISH_INCLUDES) -I/ -o $@ -c $< | |
$(BUILD_PATH)/LCD/LCD_Font.o: LCD/LCD_Font.c | |
$(SILENT_CXX) $(CXX) $(CFLAGS) $(CXXFLAGS) $(LIBMAPLE_INCLUDES) $(WIRISH_INCLUDES) -I/ -o $@ -c $< | |
$(BUILD_PATH)/LCD/LCD_Utils.o: LCD/LCD_Utils.c | |
$(SILENT_CXX) $(CXX) $(CFLAGS) $(CXXFLAGS) $(LIBMAPLE_INCLUDES) $(WIRISH_INCLUDES) -I/ -o $@ -c $< | |
$(BUILD_PATH)/LCD/LCD_Touch.o: LCD/LCD_Touch.cpp | |
$(SILENT_CXX) $(CXX) $(CFLAGS) $(CXXFLAGS) $(LIBMAPLE_INCLUDES) $(WIRISH_INCLUDES) -I/ -o $@ -c $< | |
# libfixmath | |
$(BUILD_PATH)/libfixmath/fix16_trig.o: libfixmath/fix16_trig.c | |
$(SILENT_CXX) $(CXX) $(CFLAGS) $(CXXFLAGS) $(LIBMAPLE_INCLUDES) $(WIRISH_INCLUDES) -I/ -o $@ -c $< | |
$(BUILD_PATH)/libfixmath/fix16_sqrt.o: libfixmath/fix16_sqrt.c | |
$(SILENT_CXX) $(CXX) $(CFLAGS) $(CXXFLAGS) $(LIBMAPLE_INCLUDES) $(WIRISH_INCLUDES) -I/ -o $@ -c $< | |
$(BUILD_PATH)/libfixmath/fix16_exp.o: libfixmath/fix16_exp.c | |
$(SILENT_CXX) $(CXX) $(CFLAGS) $(CXXFLAGS) $(LIBMAPLE_INCLUDES) $(WIRISH_INCLUDES) -I/ -o $@ -c $< | |
$(BUILD_PATH)/libfixmath/fix16.o: libfixmath/fix16.c | |
$(SILENT_CXX) $(CXX) $(CFLAGS) $(CXXFLAGS) $(LIBMAPLE_INCLUDES) $(WIRISH_INCLUDES) -I/ -o $@ -c $< | |
# Library | |
$(BUILD_PATH)/libmaple.a: $(BUILDDIRS) $(TGT_BIN) | |
- rm -f $@ | |
$(AR) crv $(BUILD_PATH)/libmaple.a $(TGT_BIN) | |
library: $(BUILD_PATH)/libmaple.a | |
.PHONY: library | |
$(BUILD_PATH)/$(BOARD).elf: $(BUILDDIRS) $(TGT_BIN) $(OBJECTS) $(BUILD_PATH)/$(TARGET_MAIN).o | |
$(SILENT_LD) $(CXX) $(LDFLAGS) -o $@ $(TGT_BIN) $(OBJECTS) $(BUILD_PATH)/$(TARGET_MAIN).o -Wl,-Map,$(BUILD_PATH)/$(BOARD).map | |
$(BUILD_PATH)/$(BOARD).bin: $(BUILD_PATH)/$(BOARD).elf | |
$(SILENT_OBJCOPY) $(OBJCOPY) -v -Obinary $(BUILD_PATH)/$(BOARD).elf $@ 1>/dev/null | |
$(SILENT_DISAS) $(DISAS) -d $(BUILD_PATH)/$(BOARD).elf > $(BUILD_PATH)/$(BOARD).disas | |
# @echo " " | |
# @echo "Object file sizes:" | |
# @find $(BUILD_PATH) -iname *.o | xargs $(SIZE) -t > $(BUILD_PATH)/$(BOARD).sizes | |
# @cat $(BUILD_PATH)/$(BOARD).sizes | |
@echo " " | |
@echo "Final Size:" | |
@$(SIZE) $< | |
@echo $(MEMORY_TARGET) > $(BUILD_PATH)/build-type | |
$(BUILDDIRS): | |
@mkdir -p $@ | |
MSG_INFO: | |
@echo "================================================================================" | |
@echo "" | |
@echo " Build info:" | |
@echo " BOARD: " $(BOARD) | |
@echo " MCU: " $(MCU) | |
@echo " MEMORY_TARGET: " $(MEMORY_TARGET) | |
@echo " BUILD_TARGET: " $(TARGET_MAIN)".cpp" | |
@echo "" | |
@echo " See 'make help' for all possible targets" | |
@echo "" | |
@echo "================================================================================" | |
@echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment