forked from vtex/indeva-dbfsak
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
66 lines (47 loc) · 945 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
CPP=gcc
VERSION=`cat VERSION`
CFLAGS= -Wall -O -I. -DVERSION=\"$(VERSION)\"
DESTDIR=/usr/local/bin
MANDIR=/usr/local/share/man
HEADERS=dbf.h
TARGETS=dbfsak
DUMPOBJ=dbf.o dbfmemo.o dbfsak.o
SQLOBJ=dbf.o
FILES=dbfsak.c \
dbf.c \
dbf.h \
dbfmemo.c \
Makefile \
dbfsak.1 \
LICENSE \
README \
CREDITS \
MANIFEST \
CHANGES \
VERSION
.SUFFIXES:.o.c
.c.o :
$(CPP) -c $(CFLAGS) $<
all: $(HEADERS) $(TARGETS)
clean:
rm -f *.o core $(TARGETS)
install:
cp dbfsak $(DESTDIR)
cp dbfsak.1 $(MANDIR)
cleanpkg:
rm -rf ../dbfsak-$(VERSION)
rm dbfsak-$(VERSION).tar.gz
package:
mkdir dbfsak-$(VERSION)
cp `cat MANIFEST` dbfsak-$(VERSION)
tar czvf dbfsak-$(VERSION).src.tar.gz dbfsak-$(VERSION)
rm -r dbfsak-$(VERSION)
rmdir dbfsak-$(VERSION)
# Main targets
dbfsak : $(DUMPOBJ)
$(CPP) -o $@ $(DUMPOBJ)
# Dependencies
dbfsak : dbfsak.o dbfmemo.o dbf.o
dbf.o : dbf.c
dbfsak.o : dbfsak.c Makefile
dbfmemo.o : dbfmemo.c