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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
Use system bzip2 library. Get CC and CFLAGS from environment. - jer
Unbundle libjpeg, libpcre2, libpng, libz and most of libgd. - cfuga@cfuga.mx
Bug: https://bugs.gentoo.org/249140
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,17 +1,17 @@
# Makefile for analog 6.0
-# Please read docs/Readme.html, or http://www.analog.cx/
+# Please read docs/Readme.html
# This is a general Unix-like Makefile: Makefiles for other OS's can be found
# in the "build" directory.
-CC = gcc # which compiler to use: eg cc, acc, gcc. NB Different
+#CC is set in the environment
# compilers need different CFLAGS, e.g., -O instead of -O2.
-MAKE = make # which "make" to use
-CFLAGS = -O2 # options, e.g. for optimisation or ANSI compilation.
+MAKE = make
+#CFLAGS is set in the environment
# Some OS's need -D_FILE_OFFSET_BITS=64 to support files > 2MB.
# HP/UX cc needs CFLAGS = -Aa (HP/UX 9) or -Ae (HP/UX 10)
# BeOS needs CFLAGS = -O2 -Wl,-L/boot/home/config/lib
# BS2000/OSD needs CFLAGS = -XLLML -XLLMK
# NeXTSTEP needs CFLAGS = -O2 -pipe -no-precomp
-DEFS = # any combination of -DNOPIPES -DNODNS -DNODIRENT -DNOGLOB ...
+DEFS = -DHAVE_GD -DHAVE_PCRE2 -DHAVE_ZLIB -DHAVE_BZLIB
# ... -DNOOPEN -DNOFOLLOW -DNOALARM -DNOGRAPHICS -DNOGMTIME ...
# ... -DEBCDIC -DUSE_PLAIN_SETJMP ...
# ... -DHAVE_GD -DHAVE_ZLIB -DHAVE_BZLIB -DHAVE_PCRE ...
@@ -30,7 +30,7 @@
#
OS = UNIX # Operating system: UNIX, DOS, WIN32, MAC, OS2, OSX, VMS
# RISCOS, BEOS, NEXTSTEP, MPEIX, BS2000, AS400, OS390
-LIBS = -lm # extra libraries needed; most platforms (but not OS X or BeOS)
+LIBS = -lgd -lpng -ljpeg -lz -lbz2 -lpcre2-8 -lm
# need -lm LAST
# if you defined HAVE_GD above you also need -lgd -lpng -ljpeg -lz
# if you defined HAVE_ZLIB above you also need -lz
@@ -53,42 +53,10 @@
OBJS = alias.o analog.o cache.o dates.o globals.o hash.o init.o init2.o \
input.o macinput.o macstuff.o output.o output2.o outcro.o outhtml.o \
outlatex.o outplain.o outxhtml.o outxml.o process.o settings.o sort.o \
- tree.o utils.o win32.o
-SUBDIRS = bzip2 libgd libpng pcre2 unzip zlib
-SUBDIROBJS = libgd/gd.o libgd/gd_io.o libgd/gd_io_file.o libgd/gd_png.o \
- libgd/gdfontf.o libgd/gdfonts.o libgd/gdtables.o \
- libpng/png.o libpng/pngerror.o libpng/pngmem.o libpng/pngset.o \
- libpng/pngtrans.o libpng/pngwio.o libpng/pngwrite.o \
- libpng/pngwtran.o libpng/pngwutil.o \
- pcre2/src/libpcre2_8_la-pcre2_auto_possess.o \
- pcre2/src/libpcre2_8_la-pcre2_chartables.o \
- pcre2/src/libpcre2_8_la-pcre2_chkdint.o \
- pcre2/src/libpcre2_8_la-pcre2_compile.o \
- pcre2/src/libpcre2_8_la-pcre2_context.o \
- pcre2/src/libpcre2_8_la-pcre2_convert.o \
- pcre2/src/libpcre2_8_la-pcre2_extuni.o \
- pcre2/src/libpcre2_8_la-pcre2_find_bracket.o \
- pcre2/src/libpcre2_8_la-pcre2_match.o \
- pcre2/src/libpcre2_8_la-pcre2_match_data.o \
- pcre2/src/libpcre2_8_la-pcre2_newline.o \
- pcre2/src/libpcre2_8_la-pcre2_ord2utf.o \
- pcre2/src/libpcre2_8_la-pcre2_pattern_info.o \
- pcre2/src/libpcre2_8_la-pcre2_script_run.o \
- pcre2/src/libpcre2_8_la-pcre2_string_utils.o \
- pcre2/src/libpcre2_8_la-pcre2_study.o \
- pcre2/src/libpcre2_8_la-pcre2_tables.o \
- pcre2/src/libpcre2_8_la-pcre2_ucd.o \
- pcre2/src/libpcre2_8_la-pcre2_valid_utf.o \
- pcre2/src/libpcre2_8_la-pcre2_xclass.o \
- zlib/adler32.o zlib/compress.o zlib/crc32.o zlib/deflate.o \
- zlib/gzio.o zlib/infblock.o zlib/infcodes.o zlib/inffast.o \
- zlib/inflate.o zlib/inftrees.o zlib/infutil.o zlib/trees.o \
- zlib/uncompr.o zlib/zutil.o unzip/ioapi.o unzip/unzip.o \
- bzip2/bzlib.o bzip2/blocksort.o bzip2/compress.o bzip2/crctable.o \
- bzip2/decompress.o bzip2/huffman.o bzip2/randtable.o
-HEADERS = anlghead.h anlghea2.h anlghea3.h anlghea4.h macdir.h \
- pcre2/src/pcre2.h.generic libgd/gd.h libgd/gdfontf.h libgd/gdfonts.h unzip/unzip.h \
- zlib/zlib.h bzip2/bzlib.h
+ tree.o utils.o win32.o libgd/gdfontf.o
+SUBDIRS = unzip
+SUBDIROBJS = unzip/ioapi.o unzip/unzip.o
+HEADERS = anlghead.h anlghea2.h anlghea3.h anlghea4.h macdir.h unzip/unzip.h
ALLCFLAGS = $(CFLAGS) $(DEFS) -D$(OS)
ALLOBJS = $(OBJS) $(SUBDIROBJS)
@@ -97,27 +65,12 @@
# There doesn't seem to be a good way to write all these rules in a generic
# form that works for all "make" programs
-bzip2: ALWAYS
- $(MAKE) -C bzip2 'CC=$(CC)' 'ALLCFLAGS=$(ALLCFLAGS)'
-
libgd: ALWAYS
$(MAKE) -C libgd 'CC=$(CC)' 'ALLCFLAGS=$(ALLCFLAGS)'
-libpng: ALWAYS
- $(MAKE) -C libpng 'CC=$(CC)' 'ALLCFLAGS=$(ALLCFLAGS)'
-
-pcre2: ALWAYS
- chmod 755 pcre2/132html pcre2/ar-lib pcre2/CheckMan pcre2/CleanTxt pcre2/compile pcre2/config.guess pcre2/config.sub pcre2/configure pcre2/depcomp pcre2/Detrail pcre2/install-sh pcre2/missing pcre2/perltest.sh pcre2/PrepareRelease pcre2/RunGrepTest pcre2/RunTest pcre2/test-driver
- chmod 755 pcre2/cmake pcre2/doc pcre2/m4 pcre2/src pcre2/testdata pcre2/vms
- chmod 755 pcre2/src/sljit pcre2/src/sljit/allocator_src/
- cd pcre2 && ./configure && $(MAKE) 'CC=$(CC)' 'ALLCFLAGS=$(ALLCFLAGS)'
-
unzip: ALWAYS
$(MAKE) -C unzip 'CC=$(CC)' 'ALLCFLAGS=$(ALLCFLAGS)'
-zlib: ALWAYS
- $(MAKE) -C zlib 'CC=$(CC)' 'ALLCFLAGS=$(ALLCFLAGS)'
-
alias.o: alias.c $(HEADERS) Makefile
$(CC) $(ALLCFLAGS) -c alias.c
|