amiga_imgv

diff Makefile @ 7:4c36d0f44aa6

lbm loading
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 29 Oct 2017 13:21:11 +0200
parents 663471a80c21
children
line diff
     1.1 --- a/Makefile	Fri Oct 27 15:42:58 2017 +0300
     1.2 +++ b/Makefile	Sun Oct 29 13:21:11 2017 +0200
     1.3 @@ -1,5 +1,6 @@
     1.4  src = $(wildcard src/*.c)
     1.5  obj = $(src:.c=.o)
     1.6 +dep = $(obj:.o=.d)
     1.7  bin = imgv
     1.8  
     1.9  CC = vc
    1.10 @@ -17,6 +18,17 @@
    1.11  $(bin): $(obj)
    1.12  	$(CC) -o $@ $(obj) $(LDFLAGS)
    1.13  
    1.14 +ifneq ($(CC), vc)
    1.15 +-include $(dep)
    1.16 +endif
    1.17 +
    1.18 +%.d: %.c
    1.19 +	@$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
    1.20 +
    1.21  .PHONY: clean
    1.22  clean:
    1.23  	rm -f $(obj) $(bin)
    1.24 +
    1.25 +.PHONY: cleandep
    1.26 +cleandep:
    1.27 +	rm -f $(dep)