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