For the moment, I am using the code below as my makefile. I am not sure this makes the regex gods happy, but for the moment this will have to do as I am working on juggling my other issues.
My temporary make file:
Code:
CC = g++
CFLAGS = -Wall
PROG = game
SRCS := $(patsubst %.cpp,%.o,$(wildcard *.cpp))
SRCS += $(patsubst %.cpp,%.o,$(wildcard */*.cpp))
SRCS += $(patsubst %.cpp,%.o,$(wildcard */*/*.cpp))
SRCS += $(patsubst %.cpp,%.o,$(wildcard */*/*/*.cpp))
COMPILE = $(CC) $(CFLAGS) -c
ifeq ($(shell uname),Darwin)
LIBS = -framework OpenGL -framework GLUT -framework CoreFoundation
else
LIBS = -lglut
endif
#LIBS += Lib/libSOIL.a
all: $(PROG)
$(PROG): $(SRCS)
$(CC) $(CFLAGS) -lboost_filesystem -lboost_system -o $(PROG) $(SRCS) $(LIBS)
clean:
rm -f $(PROG)
rm -f *.o
rm -f */*.o
rm -f */*/*.o
rm -f */*/*/*.o
%.o: %.cpp
$(COMPILE) -o $@ $<
FIXED: This makefile is not done because I have yet to fully get the SOIL (Simple OpenGL Image Library) library to work. Since this is a C++ form and not the Game Programming forum, I will stop here.
Don't get me wrong, I am STILL looking for a better way to improve my make file to appease the regex gods. Thanks again!