From 2bc8ab38fd19b309fb68fb277456caf21b3a9620 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Thu, 11 Oct 2012 22:36:02 -0400 Subject: [PATCH] some fixes to macosx makefiles --- Makefile.macosx | 2 +- llt/Makefile.macosx | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 llt/Makefile.macosx diff --git a/Makefile.macosx b/Makefile.macosx index 2a5a3cb..67d4aa3 100644 --- a/Makefile.macosx +++ b/Makefile.macosx @@ -33,7 +33,7 @@ flmain.o: flmain.c flisp.h flmain.do: flmain.c flisp.h $(LLT): - cd $(LLTDIR) && make + cd $(LLTDIR) && make -f Makefile.macosx $(LIBTARGET).da: $(DOBJS) rm -rf $@ diff --git a/llt/Makefile.macosx b/llt/Makefile.macosx new file mode 100644 index 0000000..814830b --- /dev/null +++ b/llt/Makefile.macosx @@ -0,0 +1,39 @@ +CC = gcc + +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 +OBJS = $(SRCS:%.c=%.o) +DOBJS = $(SRCS:%.c=%.do) +TARGET = libllt.a + +# OS flags: LINUX, WIN32, MACOSX +# architecture flags: __CPU__=xxx, BITS64, ARCH_X86, ARCH_X86_64 +CONFIG = -DMACOSX -DARCH_X86_64 -DBITS64 -D__CPU__=686 +FLAGS = -Wall -Wno-strict-aliasing $(CFLAGS) $(CONFIG) +LIBS = + +DEBUGFLAGS = -g -DDEBUG $(FLAGS) +SHIPFLAGS = -O3 -DNDEBUG $(FLAGS) + +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)