Hi all, For my project, I want to place the source files in a src directory and the .h files in an include directory, but I can't get it to work. My entire project now compiles using automake, I did a distribution, there is only this little thing left to fix :)
So, in the Makefile.am of the src dir, I put something like: ---------------------- INCLUDES = $(PROJECT_ROOT_DIR)/include -I$(XERCES_DIR)/include .... bin_PROGRAMS = dsiSecManager dsiSecManager_SOURCES = dsiSMAlarmSubscriber.cpp dsiSMWarningSubscriber.cpp \ dsiSMServiceSubscriber.cpp dsiSMParseHandlers.cpp dsiSMDSPSubscriber.cpp dsiSecManager.cpp dsiSecManager_LDFLAGS = $(LDFLAGS) -L$(DSI_ROOT_DIR)/bin -L$(XERCES_DIR)/lib dsiSecManager_LDADD = $(SM_OBJS) $(COS_OBJS) -lxerces-c -lPL -lc $(LIBS) #rule to compile the .o files %.o: %.cpp %.h $(CC) $(DEFINED) -c $(INCLUDES) $< -o $@ ---------------------- so of course my sources are in $(PROJECT_ROOT_DIR)/src Yes despite this, IF the .h files are not in the src dir, automake doesn't follow the rules I wrote for the .o files and doesn't compile with the $(DEFINED) flags, making it eventually crash. I tried several things, for example dsiSecManager_SOURCES = file1.cpp .$(PROJECT_ROOT_DIR)/include/file1.h .. but it doesn't work. I must be doing something stupid! Any ideas? Jean-Guillaume Paradis