mirror of
https://github.com/PoetryInCode/simple-rigid-sim.git
synced 2026-08-13 11:24:39 -04:00
39 lines
667 B
Plaintext
39 lines
667 B
Plaintext
LINK = -lstdc++ -lSDL2 -lOpenGL -lGLEW -lGLU
|
|
DBG = -Wall
|
|
CC := clang $(DBG)
|
|
|
|
all: build ;
|
|
|
|
goals = bin/main.o bin/Cube.o bin/Color.o bin/Quad.o bin/Vertex.o
|
|
|
|
define pro =
|
|
$(CC) -c $^ -o $@
|
|
endef
|
|
|
|
#bin/main.o: src/main.cpp
|
|
# $(pro)
|
|
#bin/Cube.o: src/Cube.cpp
|
|
# $(pro)
|
|
#bin/Color.o: src/Color.cpp
|
|
# $(pro)
|
|
#bin/Quad.o: src/Quad.cpp
|
|
# $(pro)
|
|
#bin/Vertex.o: src/Vertex.cpp
|
|
# $(pro)
|
|
|
|
$(goals): $(substr bin/,src/,%.o:%.cpp)
|
|
for goal in $(goals) ; do\
|
|
$(CC) $(subst bin/,src/,$($$goal: %.o : %.cpp)) $$goal ; \
|
|
done
|
|
|
|
build: $(goals) ;
|
|
#$(CC) $(goals) -o ./bin/simulator $(LINK)
|
|
$(goals)
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
rm -rf ./bin/*
|
|
|
|
.PHONY: run
|
|
run: build ;
|
|
./bin/simulator |