aboutsummaryrefslogtreecommitdiff
path: root/textproc/expat2/files/patch-aa
blob: 807621a158e7fa38e08e64466530dbd9e5b8ece1 (plain) (blame)
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
--- Makefile.orig	Mon Mar  8 08:20:38 1999
+++ Makefile	Wed Aug  9 04:48:01 2000
@@ -1,30 +1,30 @@
-CC=gcc
 # If you know what your system's byte order is, define XML_BYTE_ORDER:
 # use -DXML_BYTE_ORDER=12 for little-endian byte order;
 # use -DXML_BYTE_ORDER=21 for big-endian (network) byte order.
 # -DXML_NS adds support for checking of lexical aspects of XML namespaces spec
 # -DXML_MIN_SIZE makes a smaller but slower parser
-CFLAGS=-O2 -Ixmltok -Ixmlparse -DXML_NS
+CFLAGS+=-Ixmltok -Ixmlparse -DXML_NS -fpic
 # Use one of the next two lines; unixfilemap is better if it works.
 FILEMAP_OBJ=xmlwf/unixfilemap.o
 #FILEMAP_OBJ=xmlwf/readfilemap.o
 OBJS=xmltok/xmltok.o \
   xmltok/xmlrole.o \
-  xmlwf/xmlwf.o \
-  xmlwf/xmlfile.o \
-  xmlwf/codepage.o \
   xmlparse/xmlparse.o \
   xmlparse/hashtable.o \
   $(FILEMAP_OBJ)
+XOBJS=xmlwf/xmlwf.o \
+  xmlwf/xmlfile.o \
+  xmlwf/codepage.o
+
 EXE=
 
-all: xmlwf/xmlwf$(EXE)
+all: xmlwf/xmlwf$(EXE) libexpat.a libexpat.so
 
-xmlwf/xmlwf$(EXE): $(OBJS)
-	$(CC) $(CFLAGS) -o $@ $(OBJS)
+xmlwf/xmlwf$(EXE): $(XOBJS) libexpat.a
+	$(CC) $(CFLAGS) -o $@ $(XOBJS) -L. -lexpat
 
 clean:
-	rm -f $(OBJS) xmlwf/xmlwf$(EXE)
+	rm -f $(OBJS) $(XOBJS) xmlwf/xmlwf$(EXE)
 
 xmltok/nametab.h: gennmtab/gennmtab$(EXE)
 	rm -f $@
@@ -34,6 +34,13 @@
 	$(CC) $(CFLAGS) -o $@ gennmtab/gennmtab.c
 
 xmltok/xmltok.o: xmltok/nametab.h
+
+libexpat.a: $(OBJS)
+	ar -rc $@ $(OBJS)
+	ranlib $@
+
+libexpat.so: $(OBJS)
+	$(CC) -shared -o $@ $(OBJS)
 
 .c.o:
 	$(CC) $(CFLAGS) -c -o $@ $<