Put Makefile in root dir and executables in bin.
--HG--
rename : src/Makefile => Makefile
Chris Pressey
7 years ago
|
0 |
# GNU Makefile for bef.
|
|
1 |
|
|
2 |
PROGS=bin/bef bin/befprof bin/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 |
bin:
|
|
25 |
mkdir -p bin
|
|
26 |
|
|
27 |
bin/bef: bin src/bef.c
|
|
28 |
$(CC) $(CFLAGS) src/bef.c -o bin/bef
|
|
29 |
|
|
30 |
bin/befprof: bin src/befprof.c
|
|
31 |
$(CC) $(CFLAGS) src/befprof.c -o bin/befprof
|
|
32 |
|
|
33 |
bin/bef2c: bin src/bef2c.c
|
|
34 |
$(CC) $(CFLAGS) src/bef2c.c -o bin/bef2c
|
|
35 |
|
|
36 |
clean:
|
|
37 |
rm -f src/*.o
|
|
38 |
|
|
39 |
distclean:
|
|
40 |
rm -rf bin/*
|
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)
|