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