git @ Cat's Eye Technologies Befunge-93 / d9560dd
Make Makefile more common, tweak compilation conditionals. Chris Pressey 7 years ago
2 changed file(s) with 9 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
0 # GNU Makefile for bef.
0 # GNU Makefile for bef. No -Wshadow because horrible use of macros.
11
2 PROGS=bin/bef bin/befprof bin/bef2c
2 PROGS=bin/bef$(EXE) bin/befprof$(EXE) bin/bef2c$(EXE)
33 CC?=gcc
4 O?=.o
5 EXE?=
46
57 WARNS= -W -Wall -Wstrict-prototypes -Wmissing-prototypes \
68 -Wpointer-arith -Wno-uninitialized -Wreturn-type -Wcast-qual \
7 -Wwrite-strings -Wswitch -Wcast-align -Wchar-subscripts \
9 -Wwrite-strings -Wswitch -Wcast-align -Wchar-subscripts \
810 -Winline -Wnested-externs -Wredundant-decls
911
1012 ifdef ANSI
11 CFLAGS+= -ansi -pedantic
13 CFLAGS+= -ansi -pedantic -D_BSD_SOURCE
1214 else
13 CFLAGS+= -std=c99 -D_POSIX_C_SOURCE=200112L
15 CFLAGS+= -std=c99 -D_POSIX_C_SOURCE=200809L
1416 endif
1517
1618 CFLAGS+= ${WARNS} ${EXTRA_CFLAGS}
148148 #include <stdlib.h>
149149 #include <ctype.h>
150150 #include <time.h>
151 #ifndef __BORLANDC__
152 # include <unistd.h>
153 #endif
154151 #ifdef __BORLANDC__
155152 # include <dos.h>
156153 # include <conio.h>
157154 # define CONSOLE 1
158155 # define CURSORSHAPE 1
156 #else
157 # include <unistd.h>
159158 #endif /* __BORLANDC__ */
160159 #ifdef __MWERKS__
161160 # include <console.h>