Moved the common directory into the libs directory

This commit is contained in:
Kayne Ruse
2013-06-16 13:59:11 +10:00
parent a0fa874a29
commit 419c9d8765
13 changed files with 79 additions and 10 deletions
+39
View File
@@ -0,0 +1,39 @@
#config
LIBDIR=..
LOCALLIBS=$(LIBDIR)/out/libCodebase.a
LIB=
INCLUDES=$(LIBDIR)/Codebase
CXXFLAGS+=-std=c++11 -DDEBUG $(addprefix -I,$(INCLUDES))
#source
SRC=$(wildcard *.cpp)
#objects
OBJDIR=obj
OBJ=$(addprefix $(OBJDIR)/,$(SRC:.cpp=.o))
#output
OUTDIR=../out
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