Line 29... |
Line 29... |
##
|
##
|
################################################################################
|
################################################################################
|
##
|
##
|
##
|
##
|
.PHONY: all
|
.PHONY: all
|
all: exstartup oledtest gpsdump
|
PROGRAMS := exstartup oledtest gpsdump exmulti
|
|
all: $(PROGRAMS)
|
OBJDIR := obj-zip
|
OBJDIR := obj-zip
|
CC := zip-gcc
|
CC := zip-gcc
|
OBJDUMP := zip-objdump
|
OBJDUMP := zip-objdump
|
SOURCES := exstartup.c bootloader.c gpsdump.c oledtest.c
|
SOURCES := exstartup.c bootloader.c gpsdump.c oledtest.c exmulti.c
|
HEADERS := artyboard.h zipsys.h
|
HEADERS := artyboard.h zipsys.h
|
#
|
#
|
# For source analysis, the following macros are defined:
|
# For source analysis, the following macros are defined:
|
|
|
#
|
#
|
|
|
%.o: $(OBJDIR)/%.o
|
%.o: $(OBJDIR)/%.o
|
$(OBJDIR)/%.o: %.c
|
$(OBJDIR)/%.o: %.c
|
$(CC) -c -fno-builtin $< -o $@
|
$(CC) -O3 -c -fno-builtin $< -o $@
|
%.txt: %
|
%.txt: %
|
$(OBJDUMP) -S -D $^ > $@
|
$(OBJDUMP) -S -D $^ > $@
|
|
|
exstartup: exstartup.c artyboard.h zipsys.h arty.ld
|
exstartup: exstartup.c artyboard.h zipsys.h arty.ld
|
$(CC) -O3 -T arty.ld -fno-builtin -Wl,-Map=exstartup.map exstartup.c -o exstartup
|
$(CC) -O3 -T arty.ld -fno-builtin -Wl,-Map=exstartup.map exstartup.c -o exstartup
|
gpsdump: $(OBJDIR)/gpsdump.o $(OBJDIR)/bootloader.o arty.ld
|
gpsdump: $(OBJDIR)/gpsdump.o $(OBJDIR)/bootloader.o arty.ld
|
$(CC) -O3 -T arty.ld -fno-builtin -Wl,-Map=gpsdump.map $(OBJDIR)/gpsdump.o $(OBJDIR)/bootloader.o -o $@
|
$(CC) -O3 -T arty.ld -fno-builtin -Wl,-Map=gpsdump.map $(OBJDIR)/gpsdump.o $(OBJDIR)/bootloader.o -o $@
|
oledtest: $(OBJDIR)/oledtest.o $(OBJDIR)/bootloader.o $(OBJDIR)/splash.o $(OBJDIR)/mug.o arty.ld
|
oledtest: $(OBJDIR)/oledtest.o $(OBJDIR)/bootloader.o $(OBJDIR)/splash.o $(OBJDIR)/mug.o arty.ld
|
$(CC) -O3 -T arty.ld -fno-builtin -Wl,-Map=gpsdump.map $(OBJDIR)/oledtest.o $(OBJDIR)/bootloader.o $(OBJDIR)/splash.o $(OBJDIR)/mug.o -o $@
|
$(CC) -O3 -T arty.ld -fno-builtin -Wl,-Map=oledtest.map $(OBJDIR)/oledtest.o $(OBJDIR)/bootloader.o $(OBJDIR)/splash.o $(OBJDIR)/mug.o -o $@
|
|
|
|
exmulti: $(OBJDIR)/exmulti.o $(OBJDIR)/bootloader.o arty.ld
|
|
$(CC) -O3 -T arty.ld -fno-builtin -Wl,-Map=exmulti.map $(OBJDIR)/exmulti.o $(OBJDIR)/bootloader.o -o $@
|
|
|
exstartup.txt: exstartup
|
exstartup.txt: exstartup
|
$(OBJDUMP) -S -D $^ > $@
|
$(OBJDUMP) -S -D $^ > $@
|
|
|
clean:
|
clean:
|
rm -f exstartup exstartup.map exstartup.txt
|
rm -rf $(PROGRAMS) $(addsuffix .map,$(PROGRAMS)) $(addsuffix .txt,$(PROGRAMS))
|
rm -rf $(OBJDIR)/
|
rm -rf $(OBJDIR)/
|
|
|
define build-depends
|
define build-depends
|
@echo "Building dependency file(s)"
|
@echo "Building dependency file(s)"
|
@$(CC) $(CFLAGS) -MM $(SOURCES) > $(OBJDIR)/xdepends.txt
|
@$(CC) $(CFLAGS) -MM $(SOURCES) > $(OBJDIR)/xdepends.txt
|