aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorFederico Angelilli <code@fedang.net>2023-11-17 15:42:49 +0100
committerFederico Angelilli <code@fedang.net>2023-11-17 15:42:49 +0100
commitab92cac18652f72be12f68b5a96095ba8eb5afdf (patch)
treee52a5f295c7cda59e67a341fa87d25983bd56745 /Makefile
parentf8363e89257e8b0a4ff71accbd7b6be22935274f (diff)
Reorganize project structure
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile37
1 files changed, 22 insertions, 15 deletions
diff --git a/Makefile b/Makefile
index 70f37f6..b79cacc 100644
--- a/Makefile
+++ b/Makefile
@@ -1,21 +1,26 @@
-SRC = $(wildcard *.c)
+SRC = $(wildcard src/*.c)
OBJ = $(SRC:.c=.o)
BIN = comet.bin
-DEPS = \
- xcb \
- xcb-aux \
- xcb-icccm \
- xcb-ewmh \
- xcb-xrm \
- xcb-shape \
- xcb-errors \
- "xcb-randr >= 1.5" \
- "glib-2.0 >= 2.44" \
- pangocairo
-
-CFLAGS := $(shell pkg-config --cflags $(DEPS)) -ggdb
-LDFLAGS := $(shell pkg-config --libs $(DEPS)) -lm
+PCDEP = xcb \
+ xcb-aux \
+ xcb-icccm \
+ xcb-ewmh \
+ xcb-xrm \
+ xcb-shape \
+ xcb-errors \
+ "xcb-randr >= 1.5" \
+ "glib-2.0 >= 2.44" \
+ pangocairo
+
+CFLAGS := $(shell pkg-config --cflags $(PCDEP))
+LDFLAGS := $(shell pkg-config --libs $(PCDEP)) -lm
+
+ifdef RELEASE
+CFLAGS += -O2
+else
+CFLAGS += -ggdb
+endif
all: $(BIN)
@@ -27,3 +32,5 @@ $(BIN): $(OBJ)
clean:
rm -rf $(BIN) $(OBJ)
+
+# vim: ts=4 sw=4