1# COMPILATION
2#
3# 1. download and install Cygwin environment for Windows with the following
4# extra packages:
5#
6# make
7# gcc-g++ development package
8# mingw development package (for cygwin.dll free native Windows compilation)
9#
10# 2. open a Cygwin shell, cd into this directory and run make
11#
12#
13# NOTE: newer MINGW libraries may have a compilation error, where the solution
14# is removing the "using ::swprintf" and "using ::vswprintf" lines from
15# /usr/lib/gcc/i686-pc-mingw32/3.4.x/include/c++/cwchar
16#
17
18#CC=gcc
19#CXX=g++
20CC=gcc -mno-cygwin -DHUNSPELL_STATIC
21CXX=g++ -mno-cygwin -DHUNSPELL_STATIC
22
23CXXFLAGS= -O2 -ansi -pedantic -I.
24#CXXFLAGS= -O2 -Wall -ansi -pedantic -I.
25
26LDFLAGS=-L.  -lhunspell
27LD2FLAGS=-L.  -lhunspell -lparser
28
29LIBS=libhunspell.a
30LIBS2=libparser.a
31
32AR=ar rc
33RANLIB=ranlib
34
35OBJ=../hunspell/
36OBJ2=../parsers/
37OBJ3=../tools/
38
39OBJS = \
40affentry.o \
41affixmgr.o \
42hashmgr.o \
43suggestmgr.o \
44csutil.o \
45phonet.o \
46hunspell.o \
47filemgr.o \
48hunzip.o \
49replist.o
50
51OBJS2 = \
52textparser.o \
53firstparser.o \
54htmlparser.o \
55latexparser.o \
56manparser.o
57
58all: hunspell example hzip hunzip
59
60libhunspell.a: $(OBJS)
61	$(AR) $@ $(OBJS)
62	-@ ($(RANLIB) $@ || true) >/dev/null 2>&1
63
64libparser.a: $(OBJS2)
65	$(AR) $@ $(OBJS2)
66	-@ ($(RANLIB) $@ || true) >/dev/null 2>&1
67
68example: $(LIBS) example.o
69	$(CXX) $(CXXFLAGS) -o $@ example.o $(LDFLAGS)
70
71hunspell: hunspellprg.o $(LIBS) $(LIBS2)
72	$(CXX) $(CXXFLAGS) -o $@ hunspellprg.o $(LDFLAGS) $(LD2FLAGS)
73
74hunzip: hunzipprg.o $(LIBS)
75	$(CXX) $(CXXFLAGS) -o $@ hunzipprg.o $(LDFLAGS)
76
77hzip: hzip.o
78	$(CXX) $(CXXFLAGS) -o $@ hzip.o $(LDFLAGS)
79
80%.o: %.cxx
81	$(CXX) $(CXXFLAGS) -c $<
82
83clean:
84	rm -f *.exe *xx license* license* hunspell.h hzip.c *prg.cxx \
85	*.o *~ example hunspell hzip hunzip libhunspell.a libparser.a
86
87distclean:	clean
88
89hunspell.hxx:
90	ln -s $(OBJ)/*xx $(OBJ)/hunspell.h $(OBJ)/license* $(OBJ2)/*xx ./
91	ln -s $(OBJ)/hunvisapi.h ./
92	ln -s  $(OBJ3)/hunspell.cxx ./hunspellprg.cxx
93	ln -s  $(OBJ3)/hunzip.cxx ./hunzipprg.cxx
94	ln -s  $(OBJ3)/example.cxx $(OBJ3)/hzip.c ./
95	make -f Makefile.cygwin
96
97depend:
98	makedepend -- $(CXXFLAGS) -- *.[ch]xx
99
100# DO NOT DELETE THIS LINE -- make depend depends on it.
101
102affentry.o: license.hunspell config.h license.myspell affentry.hxx atypes.hxx
103affentry.o: hashmgr.hxx htypes.hxx filemgr.hxx hunzip.hxx w_char.hxx
104affentry.o: baseaffix.hxx affixmgr.hxx phonet.hxx csutil.hxx
105affentry.o: atypes.hxx hashmgr.hxx htypes.hxx filemgr.hxx hunzip.hxx
106affentry.o: w_char.hxx baseaffix.hxx affixmgr.hxx phonet.hxx
107affixmgr.o: license.hunspell config.h license.myspell affixmgr.hxx atypes.hxx
108affixmgr.o: hashmgr.hxx htypes.hxx filemgr.hxx hunzip.hxx w_char.hxx
109affixmgr.o: baseaffix.hxx phonet.hxx affentry.hxx langnum.hxx csutil.hxx
110affixmgr.o: atypes.hxx hashmgr.hxx htypes.hxx filemgr.hxx hunzip.hxx
111affixmgr.o: w_char.hxx baseaffix.hxx phonet.hxx
112atypes.o: hashmgr.hxx htypes.hxx filemgr.hxx hunzip.hxx w_char.hxx
113csutil.o: license.hunspell config.h license.myspell csutil.hxx w_char.hxx
114csutil.o: atypes.hxx hashmgr.hxx htypes.hxx filemgr.hxx hunzip.hxx
115csutil.o: langnum.hxx utf_info.cxx
116csutil.o: w_char.hxx
117dictmgr.o: dictmgr.hxx
118example.o: hunspell.hxx hashmgr.hxx htypes.hxx filemgr.hxx hunzip.hxx
119example.o: affixmgr.hxx atypes.hxx w_char.hxx baseaffix.hxx phonet.hxx
120filemgr.o: hunzip.hxx
121firstparser.o: ../hunspell/csutil.hxx w_char.hxx firstparser.hxx
122firstparser.o: textparser.hxx
123firstparser.o: textparser.hxx
124hashmgr.o: license.hunspell config.h license.myspell hashmgr.hxx htypes.hxx
125hashmgr.o: filemgr.hxx hunzip.hxx csutil.hxx w_char.hxx atypes.hxx
126hashmgr.o: htypes.hxx filemgr.hxx hunzip.hxx
127htmlparser.o: ../hunspell/csutil.hxx w_char.hxx htmlparser.hxx textparser.hxx
128htmlparser.o: textparser.hxx
129hunspell.o: license.hunspell config.h license.myspell hunspell.hxx
130hunspell.o: hashmgr.hxx htypes.hxx filemgr.hxx hunzip.hxx affixmgr.hxx
131hunspell.o: atypes.hxx w_char.hxx baseaffix.hxx phonet.hxx suggestmgr.hxx
132hunspell.o: hashmgr.hxx htypes.hxx filemgr.hxx hunzip.hxx affixmgr.hxx
133hunspell.o: atypes.hxx w_char.hxx baseaffix.hxx phonet.hxx suggestmgr.hxx
134hunspellprg.o: config.h hunspell.hxx hashmgr.hxx htypes.hxx filemgr.hxx
135hunspellprg.o: hunzip.hxx affixmgr.hxx atypes.hxx w_char.hxx baseaffix.hxx
136hunspellprg.o: latexparser.hxx manparser.hxx firstparser.hxx
137hunzip.o: hunzip.hxx
138latexparser.o: ../hunspell/csutil.hxx w_char.hxx latexparser.hxx
139latexparser.o: textparser.hxx
140latexparser.o: textparser.hxx
141manparser.o: ../hunspell/csutil.hxx w_char.hxx manparser.hxx textparser.hxx
142manparser.o: textparser.hxx
143phonet.o: csutil.hxx w_char.hxx phonet.hxx
144suggestmgr.o: license.hunspell config.h license.myspell suggestmgr.hxx
145suggestmgr.o: atypes.hxx hashmgr.hxx htypes.hxx filemgr.hxx hunzip.hxx
146suggestmgr.o: w_char.hxx affixmgr.hxx baseaffix.hxx phonet.hxx langnum.hxx
147suggestmgr.o: atypes.hxx hashmgr.hxx htypes.hxx filemgr.hxx hunzip.hxx
148suggestmgr.o: w_char.hxx affixmgr.hxx baseaffix.hxx phonet.hxx langnum.hxx
149testparser.o: textparser.hxx htmlparser.hxx latexparser.hxx
150textparser.o: ../hunspell/csutil.hxx w_char.hxx textparser.hxx
151utf_info.o: csutil.hxx w_char.hxx
152