git @ Cat's Eye Technologies Befunge-93 / 07a0ecf
Add a Makefile. catseye 9 years ago
1 changed file(s) with 35 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 # GNU Makefile for bef.
1
2 PROGS=bef befprof bef2c
3 CC?=gcc
4
5 WARNS= -W -Wall -Wstrict-prototypes -Wmissing-prototypes \
6 -Wpointer-arith -Wno-uninitialized -Wreturn-type -Wcast-qual \
7 -Wwrite-strings -Wswitch -Wcast-align -Wchar-subscripts \
8 -Winline -Wnested-externs -Wredundant-decls
9
10 ifdef ANSI
11 CFLAGS+= -ansi -pedantic
12 else
13 CFLAGS+= -std=c99 -D_POSIX_C_SOURCE=200112L
14 endif
15
16 CFLAGS+= ${WARNS} ${EXTRA_CFLAGS}
17
18 ifdef DEBUG
19 CFLAGS+= -g
20 endif
21
22 all: $(PROGS)
23
24 bef: bef.c
25 $(CC) $(CFLAGS) bef.c -o bef
26
27 befprof: befprof.c
28 $(CC) $(CFLAGS) befprof.c -o befprof
29
30 bef2c: bef2c.c
31 $(CC) $(CFLAGS) bef2c.c -o bef2c
32
33 clean:
34 rm -f *.o *.core *.exe $(PROGS)