aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2011-08-31 18:26:07 +0200
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2011-08-31 18:26:07 +0200
commit257ad41d50d443b986580cf067fef3465299d8ab (patch)
tree824b4d06a1120de9e794fcf03934a5894f26d5f0 /Makefile
Initial commit.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile35
1 files changed, 35 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..89a106c
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,35 @@
+RM_F = rm -f
+CFLAGS = -std=c99 -Wall -pedantic -ggdb -g -DUSE_TERMIOS
+LIBTOOL = libtool
+LDFLAGS = -lc
+CC = clang
+
+LIB_PREFIX = lib
+LIB_SUFFIX = .dylib
+
+mulklib_C_SOURCES = bitmapped_patricia_tree.c
+mulklib_OBJECTS = $(patsubst %.c,%.o,$(mulklib_C_SOURCES))
+mulklib_TARGET = $(LIB_PREFIX)mulklib$(LIB_SUFFIX)
+
+bpttest_C_SOURCES = bpt_test.c
+bpttest_OBJECTS = $(patsubst %.c,%.o,$(bpttest_C_SOURCES))
+bpttest_TARGET = bpt_test
+
+.PHONY: all clean
+
+all: $(mulklib_TARGET) $(bpttest_TARGET)
+
+clean:
+ $(RM_F) $(mulklib_OBJECTS)
+ $(RM_F) $(mulklib_TARGET)
+ $(RM_F) $(bpttest_OBJECTS)
+ $(RM_F) $(bpttest_TARGET)
+
+
+$(mulklib_TARGET): $(mulklib_OBJECTS)
+ $(LIBTOOL) -dynamic $(LDFLAGS) -o $@ $(mulklib_OBJECTS)
+
+bitmapped_patricia_tree.o: bitmapped_patricia_tree.c bitmapped_patricia_tree.h
+
+$(bpttest_TARGET): $(bpttest_OBJECTS) $(mulklib_TARGET)
+ $(CC) -o $@ $+