Boilerplate, boilerplate, boilerplate!!!
I've created a project for client & editor programs, by simply copying one to the other. Right now, the client still has the editor scene, but I'll switch that out soon. I've also added a license header to the server's source. I don't remember what else I did, but at this point it should theoretically build out of the box.
This commit is contained in:
@@ -1,36 +0,0 @@
|
||||
#config
|
||||
LIB=-lmingw32 -lSDLmain -lSDL -llua
|
||||
CXXFLAGS+=-std=c++11 -DDEBUG
|
||||
|
||||
#source
|
||||
SRC=$(wildcard *.cpp)
|
||||
|
||||
#objects
|
||||
OBJDIR=obj
|
||||
OBJ=$(addprefix $(OBJDIR)/,$(SRC:.cpp=.o))
|
||||
|
||||
#output
|
||||
OUTDIR=../out
|
||||
OUT=$(addprefix $(OUTDIR)/,server)
|
||||
|
||||
#targets
|
||||
all: $(OBJ) $(OUT)
|
||||
$(CXX) $(CXXFLAGS) -o $(OUT) $(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
|
||||
Reference in New Issue
Block a user