From ab92cac18652f72be12f68b5a96095ba8eb5afdf Mon Sep 17 00:00:00 2001 From: Federico Angelilli Date: Fri, 17 Nov 2023 15:42:49 +0100 Subject: Reorganize project structure --- Makefile | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) (limited to 'Makefile') 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 -- cgit v1.2.3