Last change
on this file since 161 was
161,
checked in by karaoui, 13 years ago
|
Deleting unused folders
All ELF file have the extension *.elf
Must objetc file are now dumped in the build directory
|
File size:
463 bytes
|
Rev | Line | |
---|
[160] | 1 | APP_NAME=pgcd |
---|
| 2 | |
---|
| 3 | USE+= stdio.o |
---|
| 4 | |
---|
| 5 | USES=$(patsubst %,$(BUILD_PATH)%,$(USE)) |
---|
| 6 | |
---|
| 7 | OBJS= main.o |
---|
| 8 | |
---|
[161] | 9 | all: $(APP_NAME).elf |
---|
[160] | 10 | |
---|
[161] | 11 | BIN_NAME_PATH=$(BIN_PATH)$(APP_NAME).elf |
---|
[160] | 12 | |
---|
[161] | 13 | $(APP_NAME).elf: $(OBJS) $(APP_NAME).ld |
---|
[160] | 14 | $(LD) -o $(BIN_NAME_PATH) -T $(APP_NAME).ld $(OBJS) $(USES) |
---|
| 15 | $(DU) -D $(BIN_NAME_PATH) > $@.txt |
---|
| 16 | |
---|
| 17 | %.o: %.c |
---|
| 18 | $(CC) $(INCLUDE) $(CFLAGS) $($*.o_CFLAGS) -c -o $@ $< |
---|
| 19 | $(DU) -D $@ > $@.txt |
---|
| 20 | |
---|
| 21 | |
---|
| 22 | clean: |
---|
[161] | 23 | rm -f *.o *.elf *.txt core *~ 2>$(TRASH) |
---|
[160] | 24 | rm $(BIN_NAME_PATH) 2>$(TRASH) |
---|
Note: See
TracBrowser
for help on using the repository browser.