femtolisp/llt/Makefile

38 lines
767 B
Makefile
Raw Permalink Normal View History

FREEBSD-GE-10 = $(shell test `uname` = FreeBSD -a `uname -r | cut -d. -f1` -ge 10 && echo YES)
CC = $(if $(FREEBSD-GE-10),clang,gcc)
2008-06-30 21:53:51 -04:00
SRCS = bitvector.c hashing.c socket.c timefuncs.c ptrhash.c utf8.c ios.c \
dirpath.c htable.c bitvector-ops.c int2str.c dump.c random.c \
2013-06-11 18:15:48 -04:00
lltinit.c
2008-06-30 21:53:51 -04:00
OBJS = $(SRCS:%.c=%.o)
DOBJS = $(SRCS:%.c=%.do)
TARGET = libllt.a
FLAGS = -Wall -Wno-strict-aliasing $(CFLAGS)
2008-06-30 21:53:51 -04:00
LIBS =
DEBUGFLAGS = -g -DDEBUG $(FLAGS)
SHIPFLAGS = -O3 -DNDEBUG $(FLAGS)
2008-06-30 21:53:51 -04:00
default: release
%.o: %.c
$(CC) $(SHIPFLAGS) -c $< -o $@
%.do: %.c
$(CC) $(DEBUGFLAGS) -c $< -o $@
debug: $(DOBJS)
rm -rf $(TARGET)
ar rs $(TARGET) $(DOBJS)
release: $(OBJS)
rm -rf $(TARGET)
ar rs $(TARGET) $(OBJS)
clean:
rm -f *.o
rm -f *.do
rm -f *~
rm -f core*
rm -f $(TARGET)