Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
36 lines (29 sloc) 1.21 KB
CC=clang++ -Os -Wall -Wextra -Werror -Wno-comment -std=c++0x
CFLAGS=-I/usr/local/include/GL -I/usr/local/include
SERVERCFLAGS=-I/usr/local/include
SERVERLIBS=-L/usr/local/lib -Ldtglib/ -ldtglib -lBox2D -lpthread
LIBS=-L/usr/local/lib -Ldtglib/ -framework OpenGL -framework Cocoa -lglfw -lBox2D -ldtglib
SOURCES=singleton.cpp renderer.cpp inputhandler.cpp shadermanager.cpp filereader.cpp modelmanager.cpp entity.cpp model.cpp gfxtimer.cpp timer.cpp
MAIN=client.cpp
SERVERMAIN=server.cpp
SERVERSOURCES=serversingleton.cpp filereader.cpp modelmanager.cpp model.cpp physicsmanager.cpp physicalentity.cpp timer.cpp ConnectionManager.cpp bullet.cpp contactlistener.cpp
SERVERHEADERS=$(SERVERSOURCES:.cpp=.h)
SERVEROBJECTS=$(SERVERSOURCES:.cpp=.o)
HEADERS=$(SOURCES:.cpp=.h)
OBJECTS=$(SOURCES:.cpp=.o)
SERVEREXE=server
CLIENTEXE=client
all: server client
server: $(SERVERMAIN) $(SERVEROBJECTS)
$(CC) $(SERVERMAIN) $(SERVERCFLAGS) $(SERVEROBJECTS) -o $(SERVEREXE) $(SERVERLIBS)
client: $(MAIN) $(OBJECTS)
$(CC) $(MAIN) $(CFLAGS) $(OBJECTS) gl3w.o -o $(CLIENTEXE) $(LIBS)
%.o : %.cpp %.h
$(CC) $(CFLAGS) -c -MMD $< -o $@
clean:
-rm $(SERVEREXE) $(CLIENTEXE)
mv gl3w.o gl3w.o.bak
-rm *.o
-rm *.d
mv gl3w.o.bak gl3w.o
.PHONY: all clean