Content originally posted in LPCWare by amlwwalker on Tue Aug 20 08:20:35 MST 2013
And those files are in Config, which I have included in my Makefile which looks like this:
EMWIN = $(LPCOPEN_MAKE_DIR)/emWin522
INCLUDES += -I$(EMWIN)/emWin522_header
INCLUDES += -I$(EMWIN)/emWin522_Config
INCLUDES += -I$(EMWIN)/emWin522_library/Config
#INCLUDES += -I$(LPCOPEN_MAKE_DIR)/emWin522/emWin522_library
MY_LIBS = $(wildcard $(EMWIN)/emWin522_library/GUI/*.a)
include $(LPCOPEN_MAKE_DIR)/lpcopen.mk
So my concern is how I am including Config. I get no errors ref that line of the above code, and it finds the static libraries fine (otherwise I wouldnt have this error) Im just not sure whether the -I is capable of including all .c files in the directory and thats the problem?
EDIT:
Ahh
I have moved the above from INCLUDES to SOURCES and changed it to:
SOURCES += $(wildcard $(EMWIN)/emWin522_library/Config/*.c)
I now get the error:
Fatal error: can't create build/CHIP_LPC177X_8X/obj/../emWin522/emWin522_library/Config/GUIConf.o: No such file or directory
So do I need to tell it to build the .o file first?
EDIT2:
BTW, I just found this further down the makefile
OBJS_DIR = build/$(CHIP)/obj
OBJS = $(addprefix $(OBJS_DIR)/, $(patsubst %.cpp,%.o,$(patsubst %.c,%.o,$(SOURCES)))) $(OBJS_DIR)/$(STARTUP).o $(EXTRA_OBJS)
$(OBJS_DIR)/%.o : %.c $(LPCOPEN_MAKEFILES) $(PROG_DEPS)
$(GCC) -o $@ -c $< $(CFLAGS)
$(OBJS_DIR)/%.o : %.cpp $(LPCOPEN_MAKEFILES) $(PROG_DEPS)
$(GXX) -o $@ -c $< $(CFLAGS)
$(OBJS_DIR)/%.o : %.S $(LPCOPEN_MAKEFILES) $(PROG_DEPS)
$(GCC) -o $@ -c $< $(CFLAGS)
The reason I'm showing you is because the error is to do with a .o file in the /Config folder. That is added to the variable SOURCES, which seems to be included in the above build script. I thought it was because it didnt know how to build it in to a .o but I think that is doing that isn't it?