14dcd629a50a891c210037d0e5fcc42acaecd5bb
[vlp.git] / Makefile.am
1 AUTOMAKE_OPTIONS = gnu subdir-objects
2 ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}
3
4 MOC = ${MOCDIR}/${MOCNAME}
5
6 #AM_CXXFLAGS= -Wall -pedantic -Wextra -fno-strength-reduce
7 #AM_CXXFLAGS = -m32
8 AM_CXXFLAGS = -I$(top_srcdir)/src/global
9 AM_LDFLAGS= -fPIC
10
11 EXTRA_DIST = \
12         doc/examples \
13         doc/install \
14         doc/html-old  \
15         doc/installQT.html \
16         doc/InstallVLP.html \
17         doc/INSTALL_VLP.pdf \
18         doc/CodingStyle \
19         doc/vlp.cfg.sample \
20         data
21
22 bin_PROGRAMS = \
23   bin/loggraph \
24   bin/lognet \
25   bin/logker \
26   bin/logint \
27   bin/logedit \
28   bin/lgconfig \
29   bin/logcomp \
30   bin/loghelp
31
32 BUILT_SOURCES = \
33   src/graph/loggraph.moc \
34   src/net/lognet.moc.cpp \
35   src/kernel/kernel.moc.cpp \
36   src/edit/editor.moc.cpp \
37   src/lgconfig/lgconfig.moc \
38   src/preproc/prep.moc.cpp \
39   src/help/help.moc
40
41 bin_loggraph_SOURCES = src/graph/loggraph.cpp src/graph/loggraph.moc
42 bin_loggraph_CPPFLAGS = $(bin_loggraph_CFLAGS)
43 bin_loggraph_LDADD = $(bin_loggraph_LIBS)
44 src/graph/loggraph.moc: 
45         $(MOC) -i src/graph/loggraph.cpp -o src/graph/loggraph.moc
46
47 clean-loggraph-extra:
48         rm -f src/graph/*.moc.cpp
49         rm -f bin/modules/loggraph
50         rm -f bin/loggraph
51
52 bin_lognet_SOURCES = src/net/lognet.cpp src/net/lognet.moc.cpp
53 bin_lognet_CPPFLAGS = $(bin_lognet_CFLAGS)
54 bin_lognet_LDADD = $(bin_lognet_LIBS)
55 bin_lognetdir = src/net
56 bin_lognet_HEADERS = \
57         src/net/soct.h
58 src/net/lognet.moc.cpp:
59         $(MOC) -i src/net/lognet.cpp -o src/net/lognet.moc.cpp
60
61 clean-lognet-extra:
62         rm -f src/net/*.moc.cpp
63         rm -f bin/modules/lognet
64         rm -f bin/lognet
65         
66 bin_logker_SOURCES = \
67         src/kernel/kernel.cpp \
68         src/kernel/kernel.moc.cpp \
69         src/kernel/options.moc.cpp
70 bin_logker_CPPFLAGS = $(bin_logker_CFLAGS)
71 bin_logker_LDADD = $(bin_logker_LIBS)
72 bin_logkerdir = src/kernel src/kernel/ui src/kernel/ui/dialogs
73 bin_logker_HEADERS = \
74         src/kernel/kernel.h \
75         src/kernel/send-message.h \
76         src/kernel/kill-interpreter.h \
77         src/kernel/options.h \
78         src/kernel/ui/main-window.h \
79         src/kernel/ui/dialogs/connect.h \
80         src/kernel/ui/dialogs/options.h \
81         src/kernel/ui/dialogs/kill-interpreter.h \
82         src/kernel/ui/dialogs/send-message.h
83
84 src/kernel/ui/main-window.h: data/kernel/main-window.ui
85         if [ ! -d src/kernel/ui ]; then mkdir -p src/kernel/ui; fi
86         uic-qt4 data/kernel/main-window.ui -o src/kernel/ui/main-window.h
87 src/kernel/ui/dialogs/connect.h: data/kernel/dialogs/connect.ui
88         if [ ! -d src/kernel/ui/dialogs ]; then mkdir -p src/kernel/ui/dialogs; fi
89         uic-qt4 data/kernel/dialogs/connect.ui -o src/kernel/ui/dialogs/connect.h
90 src/kernel/ui/dialogs/options.h: data/kernel/dialogs/options.ui
91         if [ ! -d src/kernel/ui/dialogs ]; then mkdir -p src/kernel/ui/dialogs; fi
92         uic-qt4 data/kernel/dialogs/options.ui -o src/kernel/ui/dialogs/options.h
93 src/kernel/ui/dialogs/kill-interpreter.h: data/kernel/dialogs/kill-interpreter.ui
94         if [ ! -d src/kernel/ui/dialogs ]; then mkdir -p src/kernel/ui/dialogs; fi
95         uic-qt4 data/kernel/dialogs/kill-interpreter.ui -o src/kernel/ui/dialogs/kill-interpreter.h
96 src/kernel/ui/dialogs/send-message.h: data/kernel/dialogs/send-message.ui
97         if [ ! -d src/kernel/ui/dialogs ]; then mkdir -p src/kernel/ui/dialogs; fi
98         uic-qt4 data/kernel/dialogs/send-message.ui -o src/kernel/ui/dialogs/send-message.h
99
100 src/kernel/kernel.moc.cpp: $(bin_logker_HEADERS)
101         moc-qt4 src/kernel/kernel.h -o src/kernel/kernel.moc.cpp
102 #       $(MOC) -i src/kernel/kernel.cpp -o src/kernel/kernel.moc
103
104 src/kernel/options.moc.cpp:
105         moc-qt4 src/kernel/options.h -o src/kernel/options.moc.cpp
106         
107 clean-logker-extra:
108         rm -f src/kernel/*.moc.cpp
109         rm -f bin/logker
110         
111 bin_logint_SOURCES = \
112   src/int/cint.c \
113   src/int/compact.c \
114   src/int/control.c \
115   src/int/util.c \
116   src/int/handler.c \
117   src/int/intdt.c \
118   src/int/memory.c \
119   src/int/object.c \
120   src/int/runsys.c \
121   src/int/standard.c \
122   src/int/execute.c \
123   src/int/fileio.c \
124   src/int/nonstand.c \
125   src/int/process.c \
126   src/int/procaddr.c \
127   src/int/queue.c \
128   src/int/rpcall.c \
129   src/int/typchk.c 
130
131 # TODO: logint is compiled using gcc instead of g++, for some reason it losts -I./src/global directive
132 #       force adding it.
133 bin_logint_CPPFLAGS = $(bin_logint_CFLAGS) -DUNIX -DWORD_32BIT -DUSE_CLOCK -Dpascal= -DOBJECTADDR -DSYSV -I$(top_srcdir)/src/global -I/usr/include/qt3
134 bin_logint_LDADD = $(bin_logint_LIBS) -lm -lqt-mt
135 bin_logintdir = src/int
136 bin_logint_HEADERS = \
137         src/int/genint.h \
138         src/int/int.h \
139         src/int/intproto.h \
140         src/int/nonstand.h \
141         src/int/process.h \
142         src/int/queue.h \
143         src/int/depend.h \
144         src/int/eventque.h \
145         src/global/comm.h \
146         src/global/genint1.h \
147         src/global/socu.h
148
149 clean-logint-extra:
150         rm -f bin/logint
151
152 bin_logedit_SOURCES = src/edit/editor.cpp src/edit/editor.moc.cpp 
153 bin_logedit_CPPFLAGS = $(bin_logedit_CFLAGS) 
154 bin_logedit_LDADD = $(bin_logedit_LIBS)
155 bin_logeditdir = src/edit
156 bin_logedit_HEADERS =\
157         src/edit/editor.h
158
159 src/edit/editor.moc.cpp: src/edit/editor.h
160         moc-qt4 src/edit/editor.h -o src/edit/editor.moc.cpp
161 #       $(MOC) src/edit/editor.h -o src/edit/editor.moc.cpp
162
163
164 clean-logedit-extra:
165         rm -f src/edit/*.moc.cpp
166         rm -f bin/modules/logedit
167         rm -f bin/logedit
168
169 bin_lgconfig_SOURCES = src/lgconfig/lgconfig.cpp src/lgconfig/lgconfig.moc
170 bin_lgconfig_CPPFLAGS = $(bin_lgconfig_CFLAGS)
171 bin_lgconfig_LDADD = $(bin_lgconfig_LIBS)
172 src/lgconfig/lgconfig.moc:
173         $(MOC) -i src/lgconfig/lgconfig.cpp -o src/lgconfig/lgconfig.moc
174
175 clean-lgconfig-extra:
176         rm -f src/lgconfig/*.moc
177         rm -f bin/lgconfig
178
179 bin_logcomp_SOURCES = src/preproc/prep.cpp src/preproc/prep.moc.cpp
180 bin_logcomp_CPPFLAGS = $(bin_logcomp_CFLAGS)
181 bin_logcomp_LDADD = $(bin_logcomp_LIBS)
182 src/preproc/prep.moc.cpp: src/preproc/prep.cpp 
183         $(MOC) src/preproc/prep.cpp -o src/preproc/prep.moc.cpp
184
185 clean-logcomp-extra:
186         rm -f src/preproc/*.moc
187         rm -f bin/logcomp
188
189 bin_loghelp_SOURCES = src/help/help.cpp src/help/help.moc
190 bin_loghelp_CPPFLAGS = $(bin_loghelp_CFLAGS)
191 bin_loghelp_LDADD = $(bin_loghelp_LIBS)
192 src/help/help.moc:
193         $(MOC) -i src/help/help.cpp -o src/help/help.moc
194
195 clean-loghelp-extra:
196         rm -f src/help/*.moc
197         rm -f bin/modules/loghelp
198         rm -f bin/loghelp
199
200 all-local: doxyfile.stamp
201         test -d bin/doc || mkdir bin/doc
202         test -d bin/pics || mkdir bin/pics
203         test -d bin/modules || mkdir bin/modules
204         test -d bin/config || mkdir bin/config
205         test -d bin/compile || mkdir bin/compile
206         test -d bin/doc/lang || mkdir bin/doc/lang
207         test -d bin/examp || mkdir bin/examp
208         ln -fs ../logedit bin/modules/
209         ln -fs ../loggraph bin/modules/
210         ln -fs ../loghelp bin/modules/
211         ln -fs ../lognet bin/modules/
212         ln -fs ../logint bin/modules/
213         ln -fs ../logcomp bin/compile/
214         ln -fs ../lgconfig bin/config/
215         ln -fs ../../doc/install/inst/loglan bin/compile/
216         ln -fs ../../doc/install/inst/gen bin/compile/
217         cp doc/vlp.cfg.sample bin/vlp.cfg
218         cp -r doc/examples/* bin/examp/
219         cp doc/install/inst/close.bmp bin/pics/
220         cp doc/install/inst/logo.bmp bin/config/
221
222 clean-am: \
223   clean-loggraph-extra \
224   clean-lognet-extra \
225   clean-logker-extra \
226   clean-logint-extra \
227   clean-logedit-extra \
228   clean-lgconfig-extra \
229   clean-logcomp-extra \
230   clean-loghelp-extra
231         rm -rf bin/doc
232         rm -rf bin/pics
233         rm -rf bin/modules
234         rm -rf bin/config
235         rm -rf bin/compile
236         rm -rf bin/examp
237         rm -f bin/vlp.cfg
238
239 CLEANFILES = \
240         %.o \
241         %.bak \
242         %~ \
243         doxyfile.stamp
244
245 if HAVE_DOXYGEN
246
247 directory = $(top_srcdir)/doc/man/man3
248
249 #dist_man_MANS = \
250 #       $(directory)/Editor.3 \
251 #       $(directory)/QKernel.3
252 #$(directory)/man_page_1.3: doxyfile.stamp
253 #$(directory)/man_page_2.3: doxyfile.stamp
254
255 doxyfile.stamp:
256         $(DOXYGEN) Doxyfile
257         echo Timestamp > doxyfile.stamp
258
259 #all-local: doxyfile.stamp
260
261 clean-local:
262         rm -rf $(top_srcdir)/doc/man
263
264 endif
265
266 dist_noinst_SCRIPTS = autogen.sh