Code formatting
[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 -I${QTDIR}/include/qt4 -pedantic -Wall -Wextra -DQT3_SUPPORT 
9 AM_LDFLAGS= -fPIC -L$(QTDIR)/lib -lQtCore -lQtGui -lQt3Support
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
21 #   bin/loggraph   \
22 #  bin/loghelp
23
24 bin_PROGRAMS = \
25   bin/lognet \
26   bin/logker \
27   bin/logint \
28   bin/logedit \
29   bin/lgconfig \
30   bin/logcomp
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) -lconfig++
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/lock.cpp \
70         src/kernel/options.cpp \
71         src/kernel/options.moc.cpp
72 bin_logker_CPPFLAGS = $(bin_logker_CFLAGS)
73 bin_logker_LDADD = $(bin_logker_LIBS) -lconfig++ -lX11
74 bin_logkerdir = src/kernel
75 bin_logker_HEADERS = \
76         src/kernel/kernel.h \
77         src/kernel/lock.h \
78         src/kernel/options.h
79 src/kernel/kernel.moc.cpp: src/kernel/kernel.h src/kernel/kernelwindow.h src/kernel/lock_dialog.h src/kernel/optionsdialog.h
80         moc-qt4 src/kernel/kernel.h -o src/kernel/kernel.moc.cpp
81         moc-qt4 src/kernel/options.h -o src/kernel/options.moc.cpp
82 #       $(MOC) -i src/kernel/kernel.cpp -o src/kernel/kernel.moc
83
84 src/kernel/kernelwindow.h:
85         uic src/kernel/kernelwindow.ui -o src/kernel/kernelwindow.h
86
87 src/kernel/lock_dialog.h:
88         uic src/kernel/lock_dialog.ui -o src/kernel/lock_dialog.h
89
90 src/kernel/optionsdialog.h:
91         uic src/kernel/optionsdialog.ui -o src/kernel/optionsdialog.h
92
93
94 clean-logker-extra:
95         rm -f src/kernel/*.moc
96         rm -f src/kernel/*.moc.cpp
97         rm -f src/kernel/kernelwindow.h
98         rm -f src/kernel/lock_dialog.h
99         rm -f src/kernel/optionsdialog.h
100         rm -f bin/logker
101         
102 bin_logint_SOURCES = \
103   src/int/cint.c \
104   src/int/compact.c \
105   src/int/control.c \
106   src/int/util.c \
107   src/int/handler.c \
108   src/int/intdt.c \
109   src/int/memory.c \
110   src/int/object.c \
111   src/int/runsys.c \
112   src/int/standard.c \
113   src/int/execute.c \
114   src/int/fileio.c \
115   src/int/nonstand.c \
116   src/int/process.c \
117   src/int/procaddr.c \
118   src/int/queue.c \
119   src/int/rpcall.c \
120   src/int/typchk.c 
121
122 # TODO: logint is compiled using gcc instead of g++, for some reason it losts -I./src/global directive
123 #       force adding it.
124 bin_logint_CPPFLAGS = $(bin_logint_CFLAGS) -DUNIX -DWORD_32BIT -DUSE_CLOCK -Dpascal= -DOBJECTADDR -DSYSV -I$(top_srcdir)/src/global -I/usr/include/qt3
125 bin_logint_LDADD = $(bin_logint_LIBS) -lm
126 # -lqt-mt
127 bin_logintdir = src/int
128 bin_logint_HEADERS = \
129         src/int/genint.h \
130         src/int/int.h \
131         src/int/intproto.h \
132         src/int/nonstand.h \
133         src/int/process.h \
134         src/int/queue.h \
135         src/int/depend.h \
136         src/int/eventque.h \
137         src/global/comm.h \
138         src/global/genint1.h \
139         src/global/socu.h
140
141 clean-logint-extra:
142         rm -f bin/logint
143
144 bin_logedit_SOURCES = src/edit/editor.cpp src/edit/editor.moc.cpp 
145 bin_logedit_CPPFLAGS = $(bin_logedit_CFLAGS) 
146 bin_logedit_LDADD = $(bin_logedit_LIBS)
147 bin_logeditdir = src/edit
148 bin_logedit_HEADERS =\
149         src/edit/editor.h
150
151 src/edit/editor.moc.cpp: src/edit/editor.h
152         moc-qt4 src/edit/editor.h -o src/edit/editor.moc.cpp
153 #       $(MOC) src/edit/editor.h -o src/edit/editor.moc.cpp
154
155
156 clean-logedit-extra:
157         rm -f src/edit/*.moc.cpp
158         rm -f bin/modules/logedit
159         rm -f bin/logedit
160
161 bin_lgconfig_SOURCES = src/lgconfig/lgconfig.cpp src/lgconfig/lgconfig.moc
162 bin_lgconfig_CPPFLAGS = $(bin_lgconfig_CFLAGS)
163 bin_lgconfig_LDADD = $(bin_lgconfig_LIBS) -lconfig++
164 src/lgconfig/lgconfig.moc:
165         $(MOC) -i src/lgconfig/lgconfig.cpp -o src/lgconfig/lgconfig.moc
166
167 clean-lgconfig-extra:
168         rm -f src/lgconfig/*.moc
169         rm -f bin/lgconfig
170
171 bin_logcomp_SOURCES = src/preproc/prep.cpp src/preproc/prep.moc.cpp
172 bin_logcomp_CPPFLAGS = $(bin_logcomp_CFLAGS)
173 bin_logcomp_LDADD = $(bin_logcomp_LIBS)
174 src/preproc/prep.moc.cpp: src/preproc/prep.cpp 
175         $(MOC) src/preproc/prep.cpp -o src/preproc/prep.moc.cpp
176
177 clean-logcomp-extra:
178         rm -f src/preproc/*.moc
179         rm -f bin/logcomp
180
181 bin_loghelp_SOURCES = src/help/help.cpp src/help/help.moc
182 bin_loghelp_CPPFLAGS = $(bin_loghelp_CFLAGS)
183 bin_loghelp_LDADD = $(bin_loghelp_LIBS)
184 src/help/help.moc:
185         $(MOC) -i src/help/help.cpp -o src/help/help.moc
186
187 clean-loghelp-extra:
188         rm -f src/help/*.moc
189         rm -f bin/modules/loghelp
190         rm -f bin/loghelp
191
192 all-local: doxyfile.stamp
193         test -d bin/doc || mkdir bin/doc
194         test -d bin/pics || mkdir bin/pics
195         test -d bin/modules || mkdir bin/modules
196         test -d bin/config || mkdir bin/config
197         test -d bin/compile || mkdir bin/compile
198         test -d bin/doc/lang || mkdir bin/doc/lang
199         test -d bin/examp || mkdir bin/examp
200         ln -fs ../logedit bin/modules/
201         ln -fs ../loggraph bin/modules/
202         ln -fs ../loghelp bin/modules/
203         ln -fs ../lognet bin/modules/
204         ln -fs ../logint bin/modules/
205         ln -fs ../logcomp bin/compile/
206         ln -fs ../lgconfig bin/config/
207         ln -fs ../../doc/install/inst/loglan bin/compile/
208         ln -fs ../../doc/install/inst/gen bin/compile/
209         cp doc/vlp.cfg.sample bin/vlp.cfg
210         cp -r doc/examples/* bin/examp/
211         cp doc/install/inst/close.bmp bin/pics/
212         cp doc/install/inst/logo.bmp bin/config/
213
214 clean-am: \
215   clean-loggraph-extra \
216   clean-lognet-extra \
217   clean-logker-extra \
218   clean-logint-extra \
219   clean-logedit-extra \
220   clean-lgconfig-extra \
221   clean-logcomp-extra \
222   clean-loghelp-extra
223         rm -rf bin/doc
224         rm -rf bin/pics
225         rm -rf bin/modules
226         rm -rf bin/config
227         rm -rf bin/compile
228         rm -rf bin/examp
229         rm -f bin/vlp.cfg
230
231 CLEANFILES = \
232         %.o \
233         %.bak \
234         %~ \
235         doxyfile.stamp
236
237 if HAVE_DOXYGEN
238
239 directory = $(top_srcdir)/doc/man/man3
240
241 #dist_man_MANS = \
242 #       $(directory)/Editor.3 \
243 #       $(directory)/QKernel.3
244 #$(directory)/man_page_1.3: doxyfile.stamp
245 #$(directory)/man_page_2.3: doxyfile.stamp
246
247 doxyfile.stamp:
248         $(DOXYGEN) Doxyfile
249         echo Timestamp > doxyfile.stamp
250
251 #all-local: doxyfile.stamp
252
253 clean-local:
254         rm -rf $(top_srcdir)/doc/man
255
256 endif
257
258 dist_noinst_SCRIPTS = autogen.sh