summaryrefslogtreecommitdiff
path: root/pg.mk
diff options
context:
space:
mode:
authorOxore <oxore@protonmail.com>2019-09-22 22:29:33 +0300
committerOxore <oxore@protonmail.com>2019-09-22 22:29:56 +0300
commit66fbdd735e19ee473aa3287133bd72e61fe56452 (patch)
treeaa263918907ea2fb81e9bbba9cfb534afe2a031c /pg.mk
parent8c04c4bf9004afda45a68b8e1d4522d36478cd62 (diff)
Add playground target, refactor Makefile's clean-ish rules
Diffstat (limited to 'pg.mk')
-rw-r--r--pg.mk27
1 files changed, 27 insertions, 0 deletions
diff --git a/pg.mk b/pg.mk
new file mode 100644
index 0000000..41686e1
--- /dev/null
+++ b/pg.mk
@@ -0,0 +1,27 @@
+# playground target for trying things with SFML
+
+LIBF8=deps/libf8
+
+ifneq ($(PREFIX),)
+LDFLAGS+=-L$(PREFIX)/lib
+LDFLAGS+=-Wl,-rpath=$(PREFIX)/lib
+INCLUDE+=-I$(PREFIX)/include
+endif
+
+INCLUDE+=-I$(LIBF8)
+
+LDFLAGS+=-lcsfml-graphics
+LDFLAGS+=-lcsfml-window
+LDFLAGS+=-lcsfml-system
+LDFLAGS+=-lyaml
+
+CFLAGS+=-Wno-deprecated-declarations
+
+pg: src/target/pg.c $(LIBF8)/libf8.a
+ $(CC) $(LDFLAGS) $(CFLAGS) $(INCLUDE) $^ -o $@
+
+$(LIBF8)/libf8.a: $(LIBF8)
+ make -C $< NOTEST=1
+
+clean:
+ rm -rfv pg