Quote:Original post by FalShen
Well... that could be the problem... It is looking for the file in the root directory, isn't it? How can I solve that?
me thinks: copy the makefile to each directory and call that recursively.
Quote:Original post by FalShen
Well... that could be the problem... It is looking for the file in the root directory, isn't it? How can I solve that?
CC = g++CFLAGS = -O3 -s `sdl-config --cflags`LFLAGS = -O3 -s `sdl-config --libs`OBJECTS = main.oEXECUTABLE = colinSRCDIR = srcOBJDIR = objall: $(EXECUTABLE)$(EXECUTABLE): $(OBJECTS) $(CC) $(LFLAGS) -o $@ $(OBJDIR)/$(OBJECTS)%.o: $(SRCDIR)/%.cpp $(CC) $(CFLAGS) -c -o $(OBJDIR)/$@ $<
Quote:Original post by FalShen
How do I make recursive make calls?
all: make -C some_directory_1 make -C some_directory_2 mv some_directory_1/*.o $(BUILD_DIR) mv some_directory_2/*.o $(BUILD_DIR)
Quote:Original post by FalShen$(EXECUTABLE): $(OBJECTS) $(CC) $(LFLAGS) -o $@ $(OBJDIR)/$(OBJECTS)%.o: $(SRCDIR)/%.cpp $(CC) $(CFLAGS) -c -o $(OBJDIR)/$@ $<
$dir1 = dir1/$dir2 = dir2/$files1 = f1.o f2.o f3.o$files2 = f4.o f5.o f6.oall: addprefix($dir1,$files1) addprefix($dir2,$files2)