Changeset 388 for trunk/softs/tsar_boot/Makefile
- Timestamp:
- May 16, 2013, 3:01:37 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/softs/tsar_boot/Makefile
r368 r388 1 ifndef PLATFORM_DIR 2 $(error please define PLATFORM_DIR 'make PLATFORM_DIR=foo') 3 else 1 ifndef MAKECMDGOALS 2 MAKECMDGOALS=none 3 endif 4 5 ifneq ($(MAKECMDGOALS),$(filter $(MAKECMDGOALS),clean distclean clean-doc doc)) 6 ifndef PLATFORM_DIR 7 $(error please define PLATFORM_DIR 'make PLATFORM_DIR=foo') 8 else 9 ifdef SOCLIB 10 DEFS+= -DSOCLIB_IOC 11 DTS=platform_soclib.dts 12 $(info Making for $(PLATFORM_DIR), SocLib variant) 13 else 14 DTS=platform_fpga.dts 15 $(info Making for $(PLATFORM_DIR), FPGA variant) 16 endif 17 endif 18 endif 4 19 5 20 LD := mipsel-unknown-elf-ld … … 12 27 DTC := dtc 13 28 HEXDUMP := hexdump 29 DOXYGEN := doxygen 14 30 15 31 BUILD_DIR := build … … 50 66 TARGET := bin.soft 51 67 52 ifdef SOCLIB53 54 DEFS+= -DSOCLIB_IOC55 DTS=platform_soclib.dts56 $(info Making for $(PLATFORM_DIR), SocLib variant)57 58 else59 60 DTS=platform_fpga.dts61 $(info Making for $(PLATFORM_DIR), FPGA variant)62 63 endif64 68 65 69 ifdef SYSCLK_FREQ 66 DEFS+= -DSYSCLK_FREQ 70 DEFS+= -DSYSCLK_FREQ=$(SYSCLK_FREQ) 67 71 endif 68 69 72 70 73 all: $(TARGET) 71 74 72 75 $(TARGET): $(BUILD_DIR) $(OBJS) $(PLATFORM_DIR)/ldscript $(BUILD_DIR)/platform.ld 73 $(ECHO) "[ LD ] $@"76 $(ECHO) "[ LD ] $@" 74 77 $(LD) -o $@ -T $(PLATFORM_DIR)/ldscript $(OBJS) 75 78 $(DU) -D $@ > $@.txt 76 79 77 80 $(BUILD_DIR)/platform.ld: $(BUILD_DIR)/platform.dtb 81 $(ECHO) "[ HEXDUMP ] $(notdir $<)" 78 82 $(HEXDUMP) -v -e '"BYTE(0x" 1/1 "%02X" ")\n"' $< > $@ 79 83 80 84 $(BUILD_DIR)/platform.dtb: $(DTS) 81 ${DTC} -O dtb -o $@ $< 85 $(ECHO) "[ DTC ] $(notdir $<)" 86 touch $@;#${DTC} -O dtb -o $@ $< &> /dev/null 82 87 83 88 $(BUILD_DIR): 84 89 $(MKDIR) $@ 85 90 91 doc: Doxyfile 92 $(DOXYGEN) Doxyfile 93 86 94 clean: 87 95 $(RM) $(TARGET).txt $(TARGET) *~ $(BUILD_DIR) 88 96 89 distclean: clean 97 clean-doc: 98 $(RM) doc 99 100 distclean: clean clean-doc 90 101 91 102 # ============================================================================= … … 93 104 94 105 $(BUILD_DIR)/%.o: %.c 95 $(ECHO) "[ CC ] $(notdir $<)"106 $(ECHO) "[ CC ] $(notdir $<)" 96 107 $(CC) $(DEFS) $(CFLAGS) $(INCLUDE) -c -o $@ $< 97 108 $(DU) -D $@ > $@.txt 98 109 99 110 $(BUILD_DIR)/%.o: %.S 100 $(ECHO) "[ AS ] $(notdir $<)"111 $(ECHO) "[ AS ] $(notdir $<)" 101 112 $(CC) $(DEFS) ${INCLUDE} -g -mips32 -c -o $@ $< 102 113 $(DU) -D $@ > $@.txt 103 114 104 115 .SILENT: 105 endif
Note: See TracChangeset
for help on using the changeset viewer.