> the top level Makefile has this rule to build the object files in > languages/imcc: > > $(IMCC_DIR)/%.o : $(IMCC_DIR)/%.c > $(PERL) tools/dev/cc_flags.pl ./CFLAGS $(CC) -I$(IMCC_DIR) $(CFLAGS) -o $@ -c $< > > the build fails at imcparser.o for me (the first object file) >
[skipping] > > Having a grovel around the FreeBSD make and GNU make documentation suggests > that $(IMCC_DIR)/%.o : $(IMCC_DIR)/%.c is a GNU make pattern rule, and > means nothing to FreeBSD. However, I'm not convinced that that rule is > even necessary, as IIRC the C compiler should be looking for include files > in the same directory as the source. [skipping] I propose replace @$(PERL) tools/dev/cc_flags.pl ./CFLAGS $(CC) $(CFLAGS) ${cc_o_out}$@ -c $< by @$(PERL) tools/dev/cc_flags.pl ./CFLAGS $(CC) $(CFLAGS) -I$(@D) ${cc_o_out}$@ -c $< and remove $(IMCC_DIR)/%${o} : $(IMCC_DIR)/%.c $(PERL) tools/dev/cc_flags.pl ./CFLAGS $(CC) -I$(IMCC_DIR) $(CFLAGS) ${cc_o_out}$@ -c $< Nick Kostirya/