File: Makefile

package info (click to toggle)
rxp 1.1-5
  • links: PTS
  • area: main
  • in suites: potato
  • size: 416 kB
  • ctags: 899
  • sloc: ansic: 8,784; makefile: 102; sh: 3
file content (80 lines) | stat: -rw-r--r-- 2,283 bytes parent folder | download
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
VERSION=	1.1

CHAR_SIZE=16

DEBUG=		-g
CC=		gcc
GCCFLAGS=	-Wall -ansi -pedantic
CFLAGS=		$(GCCFLAGS) $(DEBUG) -O2 -DCHAR_SIZE=$(CHAR_SIZE)
LDFLAGS=	$(DEBUG)

# You may well have to change this line.  Just "LIBS=" will probably work.
LIBS:sh=	[ -f /usr/lib/libsocket.a ] && echo "-lnsl -lsocket -ldl" || echo ""

COMMON=		xmlparser.o url.o charset.o string16.o ctype16.o dtd.o \
		input.o stdio16.o system.o hash.o version.o namespaces.o
SOURCES=	rxp.c xmlparser.c url.c charset.c string16.c ctype16.c dtd.c \
		input.c stdio16.c system.c hash.c version.c namespaces.c
INCLUDES=	xmlparser.h url.h charset.h string16.h ctype16.h dtd.h \
		input.h stdio16.h system.h hash.h version.h rxputil.h \
		namespaces.h

DOCS=		RELNOTES COPYRIGHT COPYING rxp.1 Manual Threads

DISTDIR=	/home/ftp/pub/richard

all:	rxp

rxp:	rxp.o librxp.a
	$(CC) $(LDFLAGS) -o rxp rxp.o -L. -lrxp $(LIBS)

rxp-web:	rxp-web.o librxp.a
	$(CC) $(LDFLAGS) -o rxp-web rxp-web.o -L. -lrxp $(LIBS)

librxp.a:	$(COMMON)
	ar rv librxp.a $(COMMON)
	ranlib librxp.a

rxp.o: rxp.c xmlparser.h input.h dtd.h charset.h stdio16.h string16.h
rxp-web.o: rxp-web.c xmlparser.h input.h dtd.h charset.h stdio16.h string16.h

xmlparser.o:	xmlparser.c xmlparser.h input.h dtd.h charset.h stdio16.h string16.h

input.o:	input.c input.h dtd.h charset.h url.h stdio16.h

dtd.o:		dtd.c dtd.h charset.h

charset.o:	charset.c charset.h

stdio16.o:	stdio16.c stdio16.h charset.h

string16.o:	string16.c string16.h charset.h

system.o:	system.c system.h stdio16.h charset.h

url.o:		url.c url.h stdio16.h

hash.o:		hash.c hash.h charset.h string16.h

ctype16.o:	ctype16.c ctype16.h charset.h system.h

namespaces.o:	namespaces.c namespaces.h charset.h rxputil.h charset.h string16.h

version.o:	version.c version.h

backup:
	rm -f ../XML2.tar
	tar cfh ../XML2.tar *.[ch] Makefile

dist:
	rm -rf rxp-$(VERSION).tar.gz rxp-$(VERSION)
	mkdir rxp-$(VERSION)
	cp -p $(SOURCES) $(INCLUDES) Makefile $(DOCS) rxp-$(VERSION)
	tar cvf rxp-$(VERSION).tar rxp-$(VERSION)
	rm -rf rxp-$(VERSION)
	gzip -v rxp-$(VERSION).tar

dist-install: dist
	mv rxp-$(VERSION).tar.gz $(DISTDIR)
	sed s/_VERSION_/$(VERSION)/ <rxp-release.xml | sed s/_DATE_/`date +%Y%m%d`/ >$(DISTDIR)/rxp-release.xml
	cd $(DISTDIR); rm rxp.tar.gz; ln -s rxp-$(VERSION).tar.gz rxp.tar.gz