From 57be0f022ec73855befd8d4688a002ed29e9defc Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Fri, 3 May 2024 07:40:04 +0200 Subject: [PATCH] tweak makefile for faster debugging --- Makefile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 00da29b..3daa0b7 100644 --- a/Makefile +++ b/Makefile @@ -12,12 +12,17 @@ ifdef DEBUG CFLAGS += -D _DEBUG -D _DEBUG_X endif +SRCS := $(wildcard src/*.c) $(wildcard src/*/*.c) +OBJS := $(SRCS:c=o) res.o + .PHONY: clean all all: $(TARGET) -$(TARGET): $(wildcard src/*.c) $(wildcard src/*/*.c) - $(WINDRES) -J rc res.rc res.o - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ exports.def res.o $(LIBS) +%.o: %.rc + $(WINDRES) -J rc $< $@ + +$(TARGET): $(OBJS) + $(CC) $(LDFLAGS) -o $@ $^ exports.def $(LIBS) clean: - $(RM) $(TARGET) res.o + $(RM) $(TARGET) $(OBJS)