commit 50c3212ba959fbd478e7fd011ffad33afc460961 parent e09989acecde011378665040c4466d52f1dae8e6 Author: William Casarin <jb55@jb55.com> Date: Fri, 3 Aug 2018 13:38:16 -0700 makefile: updates Diffstat:
M | Makefile | | | 18 | +++++++++++------- |
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile @@ -3,24 +3,28 @@ BIN = lnvis PREFIX ?= /usr/local CFLAGS = -ggdb -Os -Wall -Werror -Wextra -std=c99 -LDFLAGS = -lSDL -lGL +LDFLAGS = -lSDL2 -lGL -DEPS = main.o + +SRCS = main.c +SRCS += $(wildcard deps/*/*.c) + +OBJS = $(SRCS:.c=.o) + +all: $(BIN) include $(OBJS:.o=.d) %.d: %.c $(CC) -MM $(CFLAGS) $< > $@ -all: $(BIN) - -$(BIN): main.o - $(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@ +$(BIN): $(OBJS) + $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ format: fake clang-format -i *.c clean: fake - rm -f $(DEPS) + rm -f $(OBJS) *.d .PHONY: fake