-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile
executable file
·53 lines (35 loc) · 1.2 KB
/
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
APPNAME=epub2txt
DESTDIR=
BINDIR=/usr/bin
MANDIR=/usr/share/man
ETCDIR=/etc
.SUFFIXES: .o .c
all: epub2txt
VERSION=0.1.5
MYCFLAGS=-g -Wall -DVERSION=\"$(VERSION)\" $(CFLAGS)
MYLDFLAGS=$(LDFLAGS)
APP_OBJS=main.o epub2txt.o
KLIB_OBJS=klib_error.o klib_object.o klib_string.o klib_log.o klib_buffer.o klib_wstring.o klib_convertutf.o klib_getopt.o klib_getoptspec.o klib_list.o klib_path.o klib_xml.o sxmlc.o sxmlutils.o
OBJS=$(APP_OBJS) $(KLIB_OBJS)
epub2txt: $(OBJS)
$(CC) $(MYLDFLAGS) -s -o $(APPNAME) $(OBJS)
#$(CC) $(LMYDFLAGS) -o $(APPNAME) $(OBJS)
.c.o:
$(CC) $(MYCFLAGS) -o $*.o -c $*.c
clean:
rm -f *.o $(APPNAME) *stackdump
install:
mkdir -p $(DESTDIR)/$(BINDIR)
cp -p $(APPNAME) $(DESTDIR)/$(BINDIR)
mkdir -p $(DESTDIR)/$(MANDIR)/man1/
cp -pr man1/* $(DESTDIR)/$(MANDIR)/man1/
srcdist: clean
(cd ..; tar cvfz /tmp/$(APPNAME)-$(VERSION).tar.gz $(APPNAME))
web: srcdist
./makeman.pl > $(APPNAME).man.html
cp /tmp/$(APPNAME)-$(VERSION).tar.gz /home/kevin/docs/kzone5/target/
cp $(APPNAME).man.html /home/kevin/docs/kzone5/target/
cp README_$(APPNAME).html /home/kevin/docs/kzone5/source
(cd /home/kevin/docs/kzone5; ./make.pl epub2txt)
include dependencies.mak
include dependencies_klib.mak