43dadcdbb8
I just _had_ to get rid of that horrible libs/ directory. Now most of the graphical stuff is in client/, but I'll create more subdirectories so that they're not getting in the way.
39 lines
504 B
Makefile
39 lines
504 B
Makefile
#config
|
|
LOCALLIBS=
|
|
LIB=
|
|
INCLUDES=
|
|
CXXFLAGS+=-std=c++11 -DDEBUG $(addprefix -I,$(INCLUDES))
|
|
|
|
#source
|
|
SRC=$(wildcard *.cpp)
|
|
|
|
#objects
|
|
OBJDIR=obj
|
|
OBJ=$(addprefix $(OBJDIR)/,$(SRC:.cpp=.o))
|
|
|
|
#output
|
|
OUTDIR=../lib
|
|
OUT=$(addprefix $(OUTDIR)/,libCommon.a)
|
|
|
|
#targets
|
|
all: $(OBJ) $(OUT)
|
|
ar -crs $(OUT) $(OBJ)
|
|
|
|
$(OBJ): | $(OBJDIR)
|
|
|
|
$(OUT): | $(OUTDIR)
|
|
|
|
$(OBJDIR):
|
|
mkdir $(OBJDIR)
|
|
|
|
$(OUTDIR):
|
|
mkdir $(OUTDIR)
|
|
|
|
$(OBJDIR)/%.o: %.cpp
|
|
$(CXX) $(CXXFLAGS) -c -o $@ $<
|
|
|
|
clean:
|
|
$(RM) *.o *.a *.exe
|
|
|
|
rebuild: clean all
|