Files
femtolisp/tiny/Makefile
T
Rick Hanson 74041edf56 Make FreeBSD a "first class citizen" among femtolisp's build OSes.
It looks like FreeBSD should do what OpenBSD does in femtolisp's code.
The biggest change here (I think) is that of determining the correct
value of CC in the Makefile(s).  As of version 10, FreeBSD's base
compiler is clang; so there is now some logic in the Makefile(s) to
determine if the build is occurring on a FreeBSD system >= 10.0.  If
so, then the value of CC will be "clang"; otherwise, it will be "gcc",
as before.
2015-04-11 15:21:02 -04:00

24 lines
465 B
Makefile

FREEBSD-GE-10 = $(shell test `uname` = FreeBSD -a `uname -r | cut -d. -f1` -ge 10 && echo YES)
CC = $(if $(FREEBSD-GE-10),clang,gcc)
NAME = lisp
SRC = $(NAME).c
EXENAME = $(NAME)
FLAGS = -Wall -Wextra
LIBS =
DEBUGFLAGS = -g -DDEBUG $(FLAGS)
SHIPFLAGS = -O3 -fomit-frame-pointer $(FLAGS)
default: release
debug: $(SRC)
$(CC) $(DEBUGFLAGS) $(SRC) -o $(EXENAME) $(LIBS)
release: $(SRC)
$(CC) $(SHIPFLAGS) $(SRC) -o $(EXENAME) $(LIBS)
clean:
rm -f $(EXENAME)