openldap/libraries/libmdb/Makefile

24 lines
442 B
Makefile
Raw Normal View History

2011-06-30 00:07:37 +08:00
CC = gcc
W = -W -Wall -Wno-unused-parameter -Wcast-qual -Wbad-function-cast
2011-07-01 18:56:09 +08:00
OPT = -O2 -g
CFLAGS = -pthread $(OPT) $(W) $(XCFLAGS)
2011-07-01 21:37:51 +08:00
LDLIBS =
2011-06-30 00:07:37 +08:00
all: mtest mdb_stat
clean:
rm -rf mtest mdb_stat *.[ao] *~ testdb
2011-06-30 00:07:37 +08:00
test: all
mkdir testdb
2011-06-30 00:07:37 +08:00
./mtest && ./mdb_stat testdb
2011-07-01 18:56:09 +08:00
mdb_stat: mdb_stat.o mdb.o idl.o
mtest: mtest.o mdb.o idl.o
2011-06-30 00:07:37 +08:00
%: %.o mdb.o
$(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@
%.o: %.c mdb.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c $<