summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-12-07 18:13:43 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2020-12-07 18:13:43 -0500
commite8869220f5a5b245be1a89106c77f50ec07624fd (patch)
tree88a4b31bddd7d2b69de97be544d552a3262ed835 /Makefile
parent62d79ffc94f7ea177bd1a0745604490214e1e036 (diff)
switched to box2d
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