summaryrefslogtreecommitdiffstats
path: root/ldb/rules.mk
diff options
context:
space:
mode:
Diffstat (limited to 'ldb/rules.mk')
-rw-r--r--ldb/rules.mk30
1 files changed, 30 insertions, 0 deletions
diff --git a/ldb/rules.mk b/ldb/rules.mk
new file mode 100644
index 000000000..ff5dc0274
--- /dev/null
+++ b/ldb/rules.mk
@@ -0,0 +1,30 @@
+etags:
+ etags `find $(srcdir) -name "*.[ch]"`
+
+ctags:
+ ctags `find $(srcdir) -name "*.[ch]"`
+
+.SUFFIXES: _wrap.c .i
+
+.i_wrap.c:
+ [ "$(SWIG)" = "no" ] || $(SWIG) -O -Wall -python -keyword $<
+
+.SUFFIXES: .1 .1.xml .3 .3.xml .xml .html .c .o
+
+.c.o:
+ @echo Compiling $*.c
+ @mkdir -p `dirname $@`
+ @$(CC) $(CFLAGS) $(PICFLAG) -c $< -o $@
+
+.c.po:
+ @echo Compiling $*.c
+ @mkdir -p `dirname $@`
+ @$(CC) -fPIC $(CFLAGS) -c $< -o $@
+
+showflags::
+ @echo 'ldb will be compiled with flags:'
+ @echo ' CFLAGS = $(CFLAGS)'
+ @echo ' LIBS = $(LIBS)'
+
+distclean::
+ rm -f *~ */*~