summaryrefslogtreecommitdiffstats
path: root/clib/Rules.cunit.mk
diff options
context:
space:
mode:
Diffstat (limited to 'clib/Rules.cunit.mk')
-rw-r--r--clib/Rules.cunit.mk21
1 files changed, 21 insertions, 0 deletions
diff --git a/clib/Rules.cunit.mk b/clib/Rules.cunit.mk
new file mode 100644
index 0000000..961412a
--- /dev/null
+++ b/clib/Rules.cunit.mk
@@ -0,0 +1,21 @@
+CFLAGS += -m32 -std=gnu99 -D__USE_GNU -I$(DEPTH)/apps
+LDFLAGS = -rdynamic -L$(DEPTH)/apps/clib/$(ARCH_DEP_DIR)
+
+TARGETS=clib
+
+OBJS=slab.o splay.o map.o vector.o ecc.o tree.o clib.o
+
+vpath %.h ../../src
+vpath %.c ../../cunit
+
+all: $(TARGETS)
+
+clib: $(OBJS) $(DEPTH)/apps/clib/$(ARCH_DEP_DIR)/libclib.a
+ $(CC) $(LDFLAGS) -o $@ $^ -lcunit -lrt
+
+clean:
+ $(RM) $(OBJS) $(TARGETS)
+
+install:
+ $(INSTALL) -d $(CLIB_INSTALL)
+ $(INSTALL) $(TARGETS) $(CLIB_INSTALL)
OpenPOWER on IntegriCloud