amiga_imgv

annotate Makefile @ 12:20c7238c60be

img2ham unfinished
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 20 Nov 2017 08:36:16 +0200
parents 663471a80c21
children
rev   line source
nuclear@3 1 src = $(wildcard src/*.c)
nuclear@0 2 obj = $(src:.c=.o)
nuclear@7 3 dep = $(obj:.o=.d)
nuclear@0 4 bin = imgv
nuclear@0 5
nuclear@0 6 CC = vc
nuclear@3 7
nuclear@3 8 ifeq ($(CC), vc)
nuclear@3 9 CFLAGS = -Isrc -Isrc/amiga
nuclear@3 10 LDFLAGS = -lamiga
nuclear@3 11 src += $(wildcard src/amiga/*.c)
nuclear@3 12 else
nuclear@3 13 CFLAGS = -pedantic -Wall -g -Isrc -Isrc/sdl `sdl-config --cflags`
nuclear@3 14 LDFLAGS = `sdl-config --libs`
nuclear@3 15 src += $(wildcard src/sdl/*.c)
nuclear@3 16 endif
nuclear@0 17
nuclear@0 18 $(bin): $(obj)
nuclear@0 19 $(CC) -o $@ $(obj) $(LDFLAGS)
nuclear@0 20
nuclear@7 21 ifneq ($(CC), vc)
nuclear@7 22 -include $(dep)
nuclear@7 23 endif
nuclear@7 24
nuclear@7 25 %.d: %.c
nuclear@7 26 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
nuclear@7 27
nuclear@0 28 .PHONY: clean
nuclear@0 29 clean:
nuclear@0 30 rm -f $(obj) $(bin)
nuclear@7 31
nuclear@7 32 .PHONY: cleandep
nuclear@7 33 cleandep:
nuclear@7 34 rm -f $(dep)