027d0125ef
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.
37 lines
502 B
Makefile
37 lines
502 B
Makefile
#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)/,editor)
|
|
|
|
#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
|