Add dependency handling for lcd/ subdir
This commit is contained in:
parent
ff5bbad940
commit
dae367b568
|
@ -27,8 +27,7 @@ INCLUDE_PATHS = -I$(ROOT_PATH) -I$(ROOT_PATH)/core
|
||||||
include $(ROOT_PATH)/Makefile.inc
|
include $(ROOT_PATH)/Makefile.inc
|
||||||
|
|
||||||
LDFLAGS+= -Wl,--gc-sections
|
LDFLAGS+= -Wl,--gc-sections
|
||||||
VPATH += lpc1xxx
|
OBJS += lpc1xxx/$(TARGET)_handlers.o lpc1xxx/LPC1xxx_startup.o
|
||||||
OBJS += $(TARGET)_handlers.o LPC1xxx_startup.o
|
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
# Startup files
|
# Startup files
|
||||||
|
|
|
@ -10,7 +10,7 @@ $(LIBFILE): $(OBJS)
|
||||||
%.o : %.c
|
%.o : %.c
|
||||||
$(CC) $(CFLAGS) -o $@ $<
|
$(CC) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
clean:
|
clean::
|
||||||
rm -f $(OBJS) $(LIBFILE) $(CLEANFILES)
|
rm -f $(OBJS) $(LIBFILE) $(CLEANFILES)
|
||||||
|
|
||||||
depend:
|
depend:
|
||||||
|
|
|
@ -24,27 +24,22 @@ include $(ROOT_PATH)/Makefile.inc
|
||||||
|
|
||||||
FOBJS= $(foreach ft,$(FONTS),$(ft).o)
|
FOBJS= $(foreach ft,$(FONTS),$(ft).o)
|
||||||
OBJS+= $(FOBJS)
|
OBJS+= $(FOBJS)
|
||||||
LIBFILE=lib$(LIBNAME).a
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
# Compiler settings, parameters and flags
|
# Actual work
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
||||||
all: $(LIBFILE) allfonts.h
|
include $(ROOT_PATH)/Makefile.util
|
||||||
|
|
||||||
$(LIBFILE): $(OBJS)
|
all: allfonts.h
|
||||||
$(AR) rcs $@ $(OBJS)
|
|
||||||
|
|
||||||
%.o : %.c
|
|
||||||
$(CC) $(CFLAGS) -o $@ $<
|
|
||||||
|
|
||||||
$(FOBJS): $(foreach ft,$(FONTS),$(ft).h) fonts.h
|
$(FOBJS): $(foreach ft,$(FONTS),$(ft).h) fonts.h
|
||||||
|
|
||||||
clean:
|
clean::
|
||||||
rm -f $(OBJS) $(LIBFILE) fonts/*.o allfonts.h
|
rm -f fonts/*.o allfonts.h
|
||||||
touch allfonts.h
|
touch allfonts.h
|
||||||
|
|
||||||
render.o: render.c render.h display.h fonts.h
|
|
||||||
|
|
||||||
.PHONY: allfonts.h
|
.PHONY: allfonts.h
|
||||||
|
|
||||||
allfonts.h:
|
allfonts.h:
|
||||||
(echo "#include <lcd/fonts.h>";for a in $(FONTS) ; do echo "#include <lcd/$$a.h>"; done) > $@
|
(echo "#include <lcd/fonts.h>";for a in $(FONTS) ; do echo "#include <lcd/$$a.h>"; done) > $@
|
||||||
|
|
Loading…
Reference in New Issue