Skip to content

Commit

Permalink
Track dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
capehill committed Jun 18, 2024
1 parent 1c88790 commit 17aa65b
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion test/Makefile.amigaos4
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ CC = ppc-amigaos-gcc
CFLAGS = -gstabs -O2 -Wall -g -I../include -DHAVE_OPENGL
LIBS = -L.. -use-dynld -lSDL2_test -lSDL2 -athread=native

SRC_FILES = $(wildcard *.c)
DEPS = $(SRC_FILES:.c=.d)

TARGETS = \
checkkeys \
controllermap \
Expand Down Expand Up @@ -312,4 +315,18 @@ testurl: testurl.o
$(CC) -o $@ $^ $(LIBS)

clean:
rm -f $(TARGETS) *.o
rm -f $(TARGETS) *.o $(DEPS)

%.d : %.c
@echo Making dependencies for $<
@$(CC) -MM -MP -MT $(@:.d=.o) -o $@ $< $(CFLAGS)

%.o : %.c
@echo Compiling $<
@$(CC) -o $@ -c $< $(CFLAGS)

# Load .d files
ifneq ($(MAKECMDGOALS),clean)
-include $(DEPS)
endif

0 comments on commit 17aa65b

Please sign in to comment.