upscheme/llt/Makefile

47 lines
876 B
Makefile
Raw Normal View History

2008-06-30 21:53:51 -04:00
CC = gcc
SRCS = bitvector.c hashing.c socket.c timefuncs.c dblprint.c ptrhash.c \
utf8.c ios.c operators.c cplxprint.c dirpath.c htable.c \
bitvector-ops.c fp.c int2str.c dump.c random.c bswap.c memalign.c \
swapreverse.c
2008-06-30 21:53:51 -04:00
OBJS = $(SRCS:%.c=%.o)
DOBJS = $(SRCS:%.c=%.do)
TARGET = libllt.a
TESTSRC = unittest.c
TESTER = llttest
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)
test:
make clean
make debug CFLAGS=-DENABLE_LLT_TEST
2008-06-30 21:53:51 -04:00
gcc $(TESTSRC) $(TARGET) -o $(TESTER) -lm
./$(TESTER)
clean:
rm -f *.o
rm -f *.do
rm -f *~
rm -f core*
rm -f $(TARGET)
rm -f $(TESTER)