tizen 2.4 release
[external/xdelta3.git] / Makefile.am
1 ACLOCAL_AMFLAGS = -I m4
2
3 bin_PROGRAMS = xdelta3
4 noinst_PROGRAMS = xdelta3regtest xdelta3decode
5
6 common_SOURCES = \
7           xdelta3-blkcache.h \
8           xdelta3-decode.h \
9           xdelta3-djw.h \
10           xdelta3-fgk.h \
11           xdelta3-hash.h \
12           xdelta3-internal.h \
13           xdelta3-list.h \
14           xdelta3-lzma.h \
15           xdelta3-main.h \
16           xdelta3-merge.h \
17           xdelta3-second.h \
18           xdelta3-test.h \
19           xdelta3-cfgs.h \
20           xdelta3.h
21
22 xdelta3_SOURCES = $(common_SOURCES) xdelta3.c
23
24 xdelta3decode_SOURCES = $(common_SOURCES) xdelta3.c
25
26 xdelta3regtest_SOURCES = $(common_SOURCES) \
27         testing/cmp.h \
28         testing/delta.h \
29         testing/file.h \
30         testing/modify.h \
31         testing/random.h \
32         testing/regtest.cc \
33         testing/regtest_c.c \
34         testing/segment.h \
35         testing/sizes.h \
36         testing/test.h
37
38 # Note: for extra sanity checks, enable -Wconversion. Note there
39 # are a lot of false positives.
40 WFLAGS = -Wall -Wshadow -fno-builtin -Wextra -Wsign-compare \
41          -Wextra -Wno-unused-parameter
42
43 C_WFLAGS = $(WFLAGS) -pedantic -std=c99
44 CXX_WFLAGS = $(WFLAGS)
45
46 common_CFLAGS = \
47               -DREGRESSION_TEST=1 \
48               -DSECONDARY_DJW=1 \
49               -DSECONDARY_FGK=1 \
50               -DXD3_POSIX=1 \
51               -DXD3_USE_LARGEFILE64=1 \
52               -DXD3_MAIN=1
53
54 if DEBUG_SYMBOLS
55   common_CFLAGS += -g
56 endif
57
58 # For additional debugging, add -DXD3_DEBUG=1, 2, 3, ...
59 xdelta3_CFLAGS = $(C_WFLAGS) $(common_CFLAGS) -DXD3_DEBUG=0
60 xdelta3_LDADD = -lm
61
62 xdelta3decode_CFLAGS = \
63         $(C_WFLAGS) \
64         -DREGRESSION_TEST=0 \
65         -DSECONDARY_DJW=0 \
66         -DSECONDARY_FGK=0 \
67         -DSECONDARY_LZMA=0 \
68         -DXD3_USE_LARGEFILE64=1 \
69         -DXD3_MAIN=1 \
70         -DXD3_ENCODER=0 \
71         -DXD3_STDIO=1 \
72         -DEXTERNAL_COMPRESSION=0 \
73         -DVCDIFF_TOOLS=0
74
75 xdelta3regtest_CXXFLAGS = \
76         $(CXX_WFLAGS) $(common_CFLAGS) -DNOT_MAIN=1 -DXD3_DEBUG=1
77 xdelta3regtest_CFLAGS = \
78         $(C_WFLAGS) $(common_CFLAGS) -DNOT_MAIN=1 -DXD3_DEBUG=1
79 xdelta3regtest_LDADD = -lm
80
81 man1_MANS = xdelta3.1
82
83 EXTRA_DIST = \
84         draft-korn-vcdiff.txt \
85         README \
86         examples/Makefile \
87         examples/README \
88         examples/checksum_test.cc \
89         examples/compare_test.c \
90         examples/encode_decode_test.c \
91         examples/small_page_test.c \
92         examples/speed_test.c \
93         examples/test.h \
94         examples/iOS/xdelta3-ios-test/xdelta3-ios-test.xcodeproj/project.pbxproj \
95         examples/iOS/xdelta3-ios-test/xdelta3-ios-test/Xd3iOSAppDelegate.h \
96         examples/iOS/xdelta3-ios-test/xdelta3-ios-test/Xd3iOSAppDelegate.m \
97         examples/iOS/xdelta3-ios-test/xdelta3-ios-test/Xd3iOSViewController.h \
98         examples/iOS/xdelta3-ios-test/xdelta3-ios-test/Xd3iOSViewController.m \
99         examples/iOS/xdelta3-ios-test/xdelta3-ios-test/en.lproj/InfoPlist.strings \
100         examples/iOS/xdelta3-ios-test/xdelta3-ios-test/en.lproj/MainStoryboard_iPad.storyboard \
101         examples/iOS/xdelta3-ios-test/xdelta3-ios-test/en.lproj/MainStoryboard_iPhone.storyboard \
102         examples/iOS/xdelta3-ios-test/xdelta3-ios-test/file_v1.bin \
103         examples/iOS/xdelta3-ios-test/xdelta3-ios-test/file_v1_to_v2.bin \
104         examples/iOS/xdelta3-ios-test/xdelta3-ios-test/file_v2.bin \
105         examples/iOS/xdelta3-ios-test/xdelta3-ios-test/main.m \
106         examples/iOS/xdelta3-ios-test/xdelta3-ios-test/xdelta3-ios-test-Info.plist \
107         examples/iOS/xdelta3-ios-test/xdelta3-ios-test/xdelta3-ios-test-Prefix.pch \
108         Makefile.mingw \
109         Makefile.orig \
110         testing/xdelta3-regtest.py \
111         testing/xdelta3-test.py \
112         xdelta3.1 \
113         xdelta3.i \
114         xdelta3.vcxproj \
115         xdelta3.wxi \
116         xdelta3.wxs
117
118 # Broken, removed from distribution:
119 #       xdelta3_pywrap.c
120 #       xdelta3.py
121
122 #PYFILES = xdelta3_pywrap.c xdelta3.py
123 #XDELTA3PY = xdelta3.py
124 #XDELTA3PYLIB = xdelta3.la
125
126 #BUILT_SOURCES = $(PYFILES)
127
128 #xdelta3_pywrap.c xdelta3.py : xdelta3.i
129 #       $(SWIG) -python -o xdelta3_pywrap.c xdelta3.i
130
131 # OS X for some reason requires:
132 # pythondir = $(PYTHON_SITE_PKG)
133 # pyexecdir = $(PYTHON_SITE_PKG)
134
135 #python_PYTHON = $(XDELTA3PY)
136 #pyexec_LTLIBRARIES = $(XDELTA3PYLIB)
137 #_xdelta3_la_SOURCES = $(srcdir)/xdelta3_pywrap.c $(xdelta3_SOURCES)
138 #_xdelta3_la_CFLAGS = $(common_CFLAGS) -DNOT_MAIN=1 $(PYTHON_CPPFLAGS)
139 #_xdelta3_la_LDFLAGS = -module