DJGPP actually doesn't like being given .exe extension at all.
Chris Pressey
7 years ago
0 | 0 | # GNU Makefile for bef. No -Wshadow because horrible use of macros. |
1 | 1 | |
2 | PROGS=bin/bef$(EXE) bin/befprof$(EXE) bin/bef2c$(EXE) | |
2 | PROGS=bin/bef bin/befprof bin/bef2c | |
3 | 3 | CC?=gcc |
4 | 4 | O?=.o |
5 | EXE?= | |
6 | 5 | RM_F?=rm -f |
7 | 6 | |
8 | 7 | WARNS= -W -Wall -Wstrict-prototypes -Wmissing-prototypes \ |
11 | 10 | -Winline -Wnested-externs -Wredundant-decls |
12 | 11 | |
13 | 12 | ifdef DJGPP |
14 | EXE=.exe | |
15 | 13 | else |
16 | 14 | ifdef ANSI |
17 | 15 | CFLAGS+= -ansi -pedantic |
28 | 26 | |
29 | 27 | all: $(PROGS) |
30 | 28 | |
31 | bin/bef$(EXE): src/bef.c | |
32 | $(CC) $(CFLAGS) src/bef.c -o bin/bef$(EXE) | |
29 | bin/bef: src/bef.c | |
30 | $(CC) $(CFLAGS) src/bef.c -o bin/bef | |
33 | 31 | |
34 | bin/befprof$(EXE): src/befprof.c | |
35 | $(CC) $(CFLAGS) src/befprof.c -o bin/befprof$(EXE) | |
32 | bin/befprof: src/befprof.c | |
33 | $(CC) $(CFLAGS) src/befprof.c -o bin/befprof | |
36 | 34 | |
37 | bin/bef2c$(EXE): src/bef2c.c | |
38 | $(CC) $(CFLAGS) src/bef2c.c -o bin/bef2c$(EXE) | |
35 | bin/bef2c: src/bef2c.c | |
36 | $(CC) $(CFLAGS) src/bef2c.c -o bin/bef2c | |
39 | 37 | |
40 | 38 | clean: |
41 | $(RM_F) *.o src/*.o | |
39 | $(RM_F) *$(O) src/*$(O) | |
42 | 40 | |
43 | 41 | distclean: |
44 | 42 | $(RM_F) $(PROGS) |