|
|
|
@ -4,21 +4,25 @@ OPT = -O2 -g |
|
|
|
|
CFLAGS = -pthread $(OPT) $(W) $(XCFLAGS)
|
|
|
|
|
LDLIBS =
|
|
|
|
|
|
|
|
|
|
all: mdb_stat mtest mtest2 mtest3 |
|
|
|
|
PROGS = mdb_stat mtest mtest2 mtest3
|
|
|
|
|
all: libmdb.a $(PROGS) |
|
|
|
|
|
|
|
|
|
clean: |
|
|
|
|
rm -rf mtest mdb_stat *.[ao] *~ testdb
|
|
|
|
|
rm -rf $(PROGS) *.[ao] *~ testdb
|
|
|
|
|
|
|
|
|
|
test: all |
|
|
|
|
mkdir testdb
|
|
|
|
|
./mtest && ./mdb_stat testdb
|
|
|
|
|
|
|
|
|
|
mdb_stat: mdb_stat.o mdb.o idl.o |
|
|
|
|
mtest: mtest.o mdb.o idl.o |
|
|
|
|
mtest2: mtest2.o mdb.o idl.o |
|
|
|
|
mtest3: mtest3.o mdb.o idl.o |
|
|
|
|
libmdb.a: mdb.o idl.o |
|
|
|
|
ar rs $@ mdb.o idl.o
|
|
|
|
|
|
|
|
|
|
%: %.o mdb.o |
|
|
|
|
mdb_stat: mdb_stat.o libmdb.a |
|
|
|
|
mtest: mtest.o libmdb.a |
|
|
|
|
mtest2: mtest2.o libmdb.a |
|
|
|
|
mtest3: mtest3.o libmdb.a |
|
|
|
|
|
|
|
|
|
%: %.o |
|
|
|
|
$(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@
|
|
|
|
|
|
|
|
|
|
%.o: %.c mdb.h |
|
|
|
|