summaryrefslogtreecommitdiff
path: root/Build/source/libs/zziplib/zziplib-0.13.58/zzip/Makefile.am
blob: 21f5c02f3a077f6a1b431684505214cb85d22111 (plain)
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
AUTOMAKE_OPTIONS = 1.5 foreign
AUTOTOOL_VERSION=autoconf-2.52 automake-1.5 libtool-1.4.2
DEFAULT_INCLUDES = # nothing - no default of -I. -I$(srcdir)
DEFS = @DEFS@ -I$(top_builddir) -I$(top_srcdir) # also for automake 1.4

lib_LTLIBRARIES = libzzip.la libzzipmmapped.la libzzipfseeko.la
zzipdir = ${includedir}/zzip
zzip_HEADERS = $(libzzip_la_headers) \
               $(libzzipmmapped_la_headers) \
               $(libzzipfseeko_la_headers)
noinst_HEADERS = __debug.h __hints.h __mmap.h __dirent.h __fnmatch.h
#
VERSION_INFO=@VERSION_INFO@
RELEASE_INFO=@RELEASE_INFO@
THREAD_SAFE=@THREAD_SAFE@
#

libzzip_la_SOURCES = \
	zip.c \
	file.c \
	dir.c \
	stat.c \
	info.c \
	err.c \
	plugin.c \
	write.c \
	fetch.c
libzzip_la_headers = \
	stdint.h \
	file.h \
	plugin.h \
	lib.h \
	zzip.h \
        write.h \
	fetch.h \
	format.h \
        info.h \
	autoconf.h \
	types.h \
	conf.h \
	_config.h \
        _msvc.h
libzzip_la_LDFLAGS= @ZZIPLIB_LDFLAGS@ $(RELEASE_INFO) $(VERSION_INFO) \
                    $(THREAD_SAFE)
libzzip_la_LIBADD= -lz @RESOLVES@

libzzipmmapped_la_SOURCES =  mmapped.c memdisk.c fetch.c
libzzipmmapped_la_headers =  mmapped.h memdisk.h fetch.h
libzzipmmapped_la_LDFLAGS= @ZZIPLIB_LDFLAGS@ $(RELEASE_INFO) $(VERSION_INFO) \
                    $(THREAD_SAFE)
libzzipmmapped_la_LIBADD= -lz @RESOLVES@

libzzipfseeko_la_SOURCES = fseeko.c fetch.c
libzzipfseeko_la_headers = fseeko.h fetch.h
libzzipfseeko_la_LDFLAGS= @ZZIPLIB_LDFLAGS@ $(RELEASE_INFO) $(VERSION_INFO) \
                    $(THREAD_SAFE)
libzzipfseeko_la_LIBADD= -lz @RESOLVES@

WCC10_DIST = zziplib.wpj
WCC10_CLEAN = *.obj *.lk1 *.mk1 *.mk *.sym *.tgt

EXTRA_DIST =  $(WCC10_DIST) _msvc.sed 
CONFIG_CLEAN_FILES = _config.h 
MAINTAINERCLEANFILES = _msvc.h
CLEANFILES = $(WCC10_CLEAN)  *.pc *.omf *~ *.tmp *.tmp.*

# here is some backward compatibility with version 0.10.* of zziplib
install-data-local : install-zzipHEADERS
	echo '#ifndef ZZIP_WARNING'   > $(DESTDIR)$(includedir)/zzip.h
	echo '#define ZZIP_WARNING 1' >>$(DESTDIR)$(includedir)/zzip.h
	echo '#ifdef __GNUC__'        >>$(DESTDIR)$(includedir)/zzip.h
	echo '#warning do no not use <zzip.h>, update to include <zzip/lib.h>'\
	                              >>$(DESTDIR)$(includedir)/zzip.h
	echo '#else'                 >>$(DESTDIR)$(includedir)/zzip.h
	echo '#error   do no not use <zzip.h>, update to include <zzip/lib.h>'\
	                              >>$(DESTDIR)$(includedir)/zzip.h
	echo '#endif'                 >>$(DESTDIR)$(includedir)/zzip.h
	echo '#endif'                 >>$(DESTDIR)$(includedir)/zzip.h
	echo '#include "zzip/lib.h"'  >>$(DESTDIR)$(includedir)/zzip.h
	sed -e 's|zzip.h|zziplib.h|' -e 's|zzip/lib.h|zzip/zzip.h|' \
	$(DESTDIR)$(includedir)/zzip.h >$(DESTDIR)$(includedir)/zziplib.h
	sed -e 's|zzip.h|zzip-io.h|' -e 's|zzip/lib.h|zzip/plugin.h|' \
	$(DESTDIR)$(includedir)/zzip.h >$(DESTDIR)$(includedir)/zzip-io.h

install-exec-local:
	@ for i in . $(DESTDIR)$(libdir)/libzzip*.so.13 \
        ; do test -d $$i && continue ; lib=`basename "$$i" .so.13` \
        ; echo "$(DESTDIR)$(libdir): ln -s $$lib.so.13 $$lib.so.10" \
        ; (cd $(DESTDIR)$(libdir) && ln -s $$lib.so.13 $$lib.so.10) \
        ; echo "$(DESTDIR)$(libdir): ln -s $$lib.so.13 $$lib.so.11" \
        ; (cd $(DESTDIR)$(libdir) && ln -s $$lib.so.13 $$lib.so.11) \
        ; echo "$(DESTDIR)$(libdir): ln -s $$lib.so.13 $$lib.so.12" \
        ; (cd $(DESTDIR)$(libdir) && ln -s $$lib.so.13 $$lib.so.12) \
	; done ; true

uninstall-local :
	(cd $(DESTDIR)$(includedir) && rm zziplib.h  zzip.h  zzip-io.h)


INDENT = indent
INDENTFLAGS = \
--blank-lines-after-procedures \
--blank-lines-before-block-comments \
--brace-indent0 \
--braces-after-if-line \
--case-indentation0 \
--cuddle-else \
--space-after-cast \
--honour-newlines \
--indent-level4 \
--line-length80 \
--continue-at-parentheses \
--leave-preprocessor-space \
--dont-break-function-decl-args \
--dont-cuddle-do-while \
--dont-format-first-column-comments \
--no-space-after-function-call-names \
--no-space-after-parentheses \
--no-tabs \
--ignore-profile \
--procnames-start-lines \
--space-after-for \
--space-after-if \
--space-after-while \
--space-special-semicolon 

DIFF_U0 = diff -U0
# __indent1 = "s|^\\([^{};]*if[^{};]*\\)\\(return[^{};]*;\\)|\\1 { \\2 }|" 
__indent1 = ":begin"
__indent2 = "s|^\\([^{}';]*\\)\\({[^{}']*}\\)\\([^{}';]*\\)$$|\\1(' \\2 ');\\3|"
__indent3 = "s|___+[;].*|/*&*/|"
__indent4 = ":end"
__indent6 = "s|!\\([^ !=)]\\)|! \\1|g"
__indent7 = "s|(' \\({[^{}']*}\\) ');|\\1|"
__indent8 = "s|/[*]\\(___+[;].*\\)[*]/$$|\\1|"
__indent9 = ":end"
indent-check:
	for file in $(srcdir)/*.c ; do f=`basename "$$file"`  \
	; sed -e $(__indent1) -e $(__indent2) -e $(__indent3) -e $(__indent4) \
          $(INDENTBEFORE) $$file \
	| $(INDENT) $(INDENTFLAGS) $(INDENTOPTS) -st - \
	| sed -e $(__indent6) -e $(__indent7) -e $(__indent8) -e $(__indent9) \
          $(INDENTAFTER) > $$f.tmp \
	; echo $(DIFF_U0) "$$file" "$$f.tmp" \
	; $(DIFF_U0) "$$file" "$$f.tmp" ; done

i:
	@ f=`basename $(file) .tmp` \
	; echo cp $(file) $(srcdir)/$$f ; sleep 2 \
	; cp $(file) $(srcdir)/$$f

# ----------------------------------------------------------------------
pkgconfigdir=$(libdir)/pkgconfig
pkgconfig_HEADERS= zzip-zlib-config.pc zziplib.pc \
                    zzipmmapped.pc zzipfseeko.pc

zziplib.pc : Makefile
	(cd .. && sh config.status zzip/zziplib.pc)

zzip-zlib-config.pc : Makefile
	@ echo "zlib_libs=@ZLIB_LDIR@ -lz" >$@
	@ echo "zlib_cflags=@ZLIB_INCL@" >>$@
	@ echo " " >>$@
	@ echo "Name: zzip-zlib-config" >>$@
	@ echo "Version: @ZLIB_VERSION@" >>$@
	@ echo "Description: ZLib Config (for ZZipLib)" >>$@
	echo 'Libs: $${zlib_libs}' >>$@
	echo 'Cflags: $${zlib_cflags}' >>$@

zzipmmapped.pc : zziplib.pc
	sed -e 's/-lzzip/-lzzipmmapped/' -e 's/zziplib/zzipmmapped/' \
	zziplib.pc >$@
zzipfseeko.pc : zziplib.pc
	sed -e 's/-lzzip/-lzzipfseeko/' -e 's/zziplib/zzipfseeko/' \
	zziplib.pc >$@

__zziplib.pc : Makefile
	@ echo "prefix=$(prefix)" >$@
	@ echo "libdir=$(libdir)" >>$@
	@ echo "includedir=$(includedir)" >>$@
	@ echo "largefile=$(LARGEFILE_CFLAGS)" >>$@
	@ echo "zlib_libs=@ZLIB_LDIR@ -lz" >>$@
	@ echo "zlib_cflags=@ZLIB_INCL@" >>$@
	@ echo " " >>$@
	@ echo "Name: zziplib" >>$@
	@ echo "Version: $(VERSION)" >>$@
	@ head $(top_srcdir)/$(PACKAGE).spec \
	| grep Summary | sed -e s,Summary,Description, >> $@
	echo 'Requires: zzip-zlib-config' >>$@
	echo 'Libs: -L$${libdir} -lzzip' >>$@
	echo 'Cflags: $${largefile} -I$${includedir}' >>$@

# ----------------------------------------------------------------------
.c.i :
	$(COMPILE) -E $< >$@