summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 6 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 4c96a7d..a91771b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,10 @@
-WARNINGS=-Wall -Wextra -Wshadow -Wconversion -Wpedantic -pedantic -std=gnu11 -Wno-unused-function -Wno-fixed-enum-extension -Wimplicit-fallthrough
-LIBS=-lSDL2 -lGL -ldl
+WARNINGS=-Wall -Wextra -Wshadow -Wconversion -Wpedantic -pedantic -std=gnu++11 -Wno-unused-function -Wno-fixed-enum-extension -Wimplicit-fallthrough
+LIBS=-ldl `pkg-config --libs --cflags box2d sdl2 gl`
DEBUG_CFLAGS=$(CFLAGS) $(WARNINGS) $(LIBS) -DDEBUG -O0 -g
obj/debug: physics obj/sim.so
touch obj/debug
-physics: main.c gui.h sim.c time.c
- $(CC) main.c -o $@ $(DEBUG_CFLAGS)
-obj/sim.so: *.[ch]
- $(CC) sim.c -fPIC -shared -o $@ $(DEBUG_CFLAGS)
+physics: main.cpp gui.hpp sim.cpp time.cpp
+ $(CXX) main.cpp -o $@ $(DEBUG_CFLAGS)
+obj/sim.so: *.[ch]*
+ $(CXX) sim.cpp -fPIC -shared -o $@ $(DEBUG_CFLAGS)
touch obj/sim.so_changed