2008-06-30 21:53:51 -04:00
|
|
|
CC = gcc
|
|
|
|
|
2012-02-17 23:59:45 -05: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 \
|
|
|
|
lltinit.c arraylist.c
|
2008-06-30 21:53:51 -04:00
|
|
|
OBJS = $(SRCS:%.c=%.o)
|
|
|
|
DOBJS = $(SRCS:%.c=%.do)
|
|
|
|
TARGET = libllt.a
|
|
|
|
|
2010-02-24 23:37:33 -05:00
|
|
|
# OS flags: LINUX, WIN32, MACOSX
|
|
|
|
# architecture flags: __CPU__=xxx, BITS64, ARCH_X86, ARCH_X86_64
|
2011-08-16 15:59:46 -04:00
|
|
|
CONFIG = -DLINUX -DARCH_X86_64 -DBITS64 -D__CPU__=686
|
2010-02-24 23:37:33 -05:00
|
|
|
FLAGS = -Wall -Wno-strict-aliasing $(CFLAGS) $(CONFIG)
|
2008-06-30 21:53:51 -04:00
|
|
|
LIBS =
|
|
|
|
|
|
|
|
DEBUGFLAGS = -g -DDEBUG $(FLAGS)
|
2009-06-09 14:46:02 -04:00
|
|
|
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)
|