This repository has been archived on 2026-04-30. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Tortuga/server/makefile
T
2013-05-19 21:27:24 +10:00

42 lines
708 B
Makefile

#config
INCLUDES=../common
CXXFLAGS+=-std=c++11 -DDEBUG $(addprefix -I,$(INCLUDES))
LIB=../common/out/common.a -lmingw32 -lSDL_net -lSDLmain -lSDL -lwsock32 -liphlpapi
#source
SRC=$(filter-out unit.cpp main.cpp, $(wildcard *.cpp))
#objects
OBJDIR=obj
OBJ=$(addprefix $(OBJDIR)/,$(SRC:.cpp=.o))
#output
OUTDIR=out
#targets
all: server unit
server: $(OBJ) $(OUT)
$(CXX) $(CXXFLAGS) -o $(OUTDIR)/$@ main.cpp $(OBJ) $(LIB)
unit: $(OBJ) $(OUT)
$(CXX) $(CXXFLAGS) -o $(OUTDIR)/$@ unit.cpp $(OBJ) $(LIB)
$(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