2007-09-04 20:59:50 +00:00
|
|
|
CFLAGS = -Wall -W -O2 -Werror -g
|
2007-10-14 13:56:25 +00:00
|
|
|
MYSQL_H = -I../../mysql-5.0.27/mysql-5.0.27/bdb/build_unix/
|
2007-10-14 12:40:03 +00:00
|
|
|
runs: runs_mysql runs_installed
|
2007-10-15 01:58:01 +00:00
|
|
|
hs: db.h_4_3 db.h_4_1
|
2007-10-14 12:40:03 +00:00
|
|
|
# the mysql versions use the header in the mysql distribution.
|
|
|
|
runs_mysql: ./sample_offsets_mysql
|
|
|
|
./sample_offsets_mysql
|
|
|
|
runs_installed: sample_offsets
|
|
|
|
./sample_offsets
|
2007-10-14 13:56:25 +00:00
|
|
|
sample_offsets_mysql: CPPFLAGS=$(MYSQL_H)
|
2007-10-14 12:40:03 +00:00
|
|
|
sample_offsets_mysql: sample_offsets.c
|
|
|
|
$(CC) $(CFLAGS) $(CPPFLAGS) $< -o $@
|
|
|
|
|
2007-10-14 13:56:25 +00:00
|
|
|
make_db_h_4_1.o: make_db_h.c sample_offsets_32_4_1.h sample_offsets_64_4_1.h
|
|
|
|
$(CC) $(CFLAGS) -I. $(MYSQL_H) $< -c -o $@ -DUSE_MAJOR=4 -DUSE_MINOR=1
|
|
|
|
db.h_4_1: make_db_h_4_1
|
|
|
|
./make_db_h_4_1 > $@
|
|
|
|
|
|
|
|
make_db_h_4_3.o: make_db_h.c sample_offsets_32_4_3.h sample_offsets_64_4_3.h
|
|
|
|
$(CC) $(CFLAGS) -I. $< -c -o $@ -DUSE_MAJOR=4 -DUSE_MINOR=3
|
|
|
|
db.h_4_3: make_db_h_4_3
|
|
|
|
./make_db_h_4_3 > $@
|
|
|
|
|
2007-09-06 14:18:08 +00:00
|
|
|
sample_offsets:
|
|
|
|
sample_offsets_local: ./db.h
|
|
|
|
sample_offsets_local: sample_offsets.c
|
|
|
|
$(CC) $(CFLAGS) -I. -DLOCAL $< -o $@
|
|
|
|
|
|
|
|
check32: sample_offsets_local
|
|
|
|
./sample_offsets_local
|
|
|
|
diff sample_offsets_local.h sample_offsets_32.h
|
2007-09-05 17:47:14 +00:00
|
|
|
|
2007-10-14 12:47:32 +00:00
|
|
|
clean:
|
|
|
|
rm sample_offsets_mysql sample_offsets
|
2007-10-14 13:56:25 +00:00
|
|
|
install_4_1: db.h_4_1
|
|
|
|
cp db.h_4_1 ../include/db.h
|
2007-10-09 22:03:24 +00:00
|
|
|
|
2007-09-05 17:47:14 +00:00
|
|
|
# Note: To make the ompile work, you must cd to the ../../mysql-5.0.27/mysql-5.0.27/bdb/build_unix
|
|
|
|
# and do ../dist/configure
|