| 1 |
|
| 2 |
|
| 3 |
O=alloc.o buffer.o buffer_0.o buffer_1.o buffer_2.o buffer_get.o buffer_put.o buffer_read.o buffer_write.o byte_copy.o byte_cr.o byte_diff.o cdb.o cdb_hash.o cdb_make.o error.o error_str.o fmt_ulong.o open_trunc.o scan_ulong.o seek_set.o str_len.o strerr_die.o strerr_sys.o uint32_pack.o uint32_unpack.o |
| 4 |
H=uint32.h |
| 5 |
A=cdb.a |
| 6 |
P=cdbmake cdbdump cdbget cdbstats |
| 7 |
|
| 8 |
CC=gcc |
| 9 |
CFLAGS=-Wall -O2 -g |
| 10 |
|
| 11 |
all: $(P) |
| 12 |
$(P): $(A) |
| 13 |
cdb.o cdb_hash.o cdb_make.o cdbmake.o cdbstats.o cdbdump.o uint32_pack.o unint32_unpack.o: $(H) |
| 14 |
|
| 15 |
cdb.a: $(O) |
| 16 |
ar cr cdb.a $(O) |
| 17 |
ranlib cdb.a || : |
| 18 |
|
| 19 |
uint32.h: tryulong32.c uint32.h1 uint32.h2 |
| 20 |
( ($(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o tryulong tryulong.c && ./tryulong) >/dev/null 2>&1 \ |
| 21 |
&& cat uint32.h2 || cat uint32.h1) >uint32.h |
| 22 |
rm -f tryulong |
| 23 |
|
| 24 |
check: $(P) |
| 25 |
./check-local $(P) |
| 26 |
|
| 27 |
clean: |
| 28 |
rm -f $(A) $(O) $(H) $(P) *.local |
| 29 |
for i in $(P); do rm -f $${i}.o; done |