Add support for filling / thindrawing raw polygons to the HID interface
[geda-pcb/gde.git] / src / Makefile.am
blobc786e0046b009d12faa301ffd7cf81696aa06c14
1 ## -*- makefile -*-
2 ## $Id$
3 ##
5 SUBDIRS=        icons
7 pcbtreedir=     @PCBTREEDIR@
8 pcblibdir=      @PCBLIBDIR@
10 AUTOMAKE_OPTIONS = subdir-objects
11 HIDLIST = @HIDLIST@
12 noinst_LIBRARIES = @HIDLIBS@
13 EXTRA_LIBRARIES = \
14         libgtk.a liblesstif.a libbatch.a \
15         liblpr.a libgerber.a libbom.a libpng.a libps.a libnelma.a
17 pcblib_DATA=    \
18         default_font \
19         gpcb-menu.res \
20         pcb-menu.res
22 bin_PROGRAMS=   pcb
24 if DEBUG_BUILD
25 # don't disable assert()
26 else
27 AM_CFLAGS = -DNDEBUG
28 endif
30 PCB_SRCS = \
31         action.c \
32         action.h \
33         autoplace.c \
34         autoplace.h \
35         autoroute.c \
36         autoroute.h \
37         box.h \
38         buffer.c \
39         buffer.h \
40         change.c \
41         change.h \
42         clip.c \
43         clip.h \
44         command.c \
45         command.h \
46         compat.c \
47         compat.h \
48         const.h \
49         copy.c \
50         copy.h \
51         create.c \
52         create.h \
53         crosshair.c \
54         crosshair.h \
55         data.c \
56         data.h \
57         djopt.c \
58         djopt.h \
59         dolists.h \
60         draw.c \
61         draw.h \
62         drill.c \
63         drill.h \
64         edif.y \
65         edif_parse.h \
66         error.c \
67         error.h \
68         file.c \
69         file.h \
70         find.c \
71         find.h \
72         flags.c \
73         fontmode.c \
74         global.h \
75         heap.c \
76         heap.h \
77         hid.h \
78         insert.c \
79         insert.h \
80         intersect.c \
81         intersect.h \
82         line.c \
83         line.h \
84         lrealpath.c \
85         lrealpath.h \
86         macro.h \
87         main.c \
88         mirror.c \
89         mirror.h \
90         misc.c \
91         misc.h \
92         move.c \
93         move.h \
94         mtspace.c \
95         mtspace.h \
96         mymem.c \
97         mymem.h \
98         netlist.c \
99         parse_l.h \
100         parse_l.l \
101         parse_y.h \
102         parse_y.y \
103         polygon.c \
104         polygon.h \
105         polygon1.c \
106         polyarea.h \
107         puller.c \
108         print.c \
109         print.h \
110         rats.c \
111         rats.h \
112         remove.c \
113         remove.h \
114         report.c \
115         report.h \
116         res_parse.y \
117         res_lex.l \
118         resource.h \
119         rotate.c \
120         rotate.h \
121         rtree.c \
122         rtree.h \
123         rubberband.c \
124         rubberband.h \
125         search.c \
126         search.h \
127         select.c \
128         select.h \
129         set.c \
130         set.h \
131         strflags.c \
132         strflags.h \
133         thermal.c \
134         thermal.h \
135         undo.c \
136         undo.h \
137         vector.c \
138         vector.h \
139         vendor.c \
140         vendor.h \
141         hid/common/actions.c \
142         hid/common/flags.c \
143         hid/common/hidinit.c \
144         hid/common/hidnogui.c \
145         hid/common/extents.c \
146         hid/common/draw_helpers.c \
147         hid/common/draw_helpers.h \
148         hid/hidint.h 
149 pcb_SOURCES = ${PCB_SRCS} core_lists.h
151 EXTRA_pcb_SOURCES = ${DBUS_SRCS}
152 DBUS_SRCS= \
153         dbus-pcbmain.c \
154         dbus-pcbmain.h \
155         dbus.h \
156         dbus.c
158 BUILT_SOURCES = \
159         core_lists.h \
160         gpcb-menu.h \
161         hid/gtk/gtk_lists.h \
162         hid/lesstif/lesstif_lists.h \
163         hid/batch/batch_lists.h \
164         hid/png/png_lists.h \
165         hid/nelma/nelma_lists.h \
166         hid/ps/ps_lists.h \
167         parse_y.h \
168         pcb-menu.h \
169         res_parse.h \
170         hid/common/hidlist.h
172 pcb_LDADD = @HIDLIBS@
173 pcb_DEPENDENCIES = @HIDLIBS@
175 # Action, Attribute, and Flag lists.
176 core_lists.h : ${PCB_SRCS} Makefile
177         true > $@
178         (for f in ${PCB_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
179         mv $@.tmp $@
181 # for globalconst.h
182 INCLUDES=       -I$(top_srcdir) -I$(srcdir)/icons
184 DEFS=   -DLOCALEDIR=\"$(localedir)\" @DEFS@
186 EXTRA_DIST= \
187         check_icon.data \
188         default_font \
189         $(srcdir)/hid/bom/hid.conf \
190         $(srcdir)/hid/gerber/hid.conf \
191         $(srcdir)/hid/gtk/gui-icons-misc.data \
192         $(srcdir)/hid/gtk/gui-icons-mode-buttons.data \
193         $(srcdir)/hid/gtk/hid.conf \
194         $(srcdir)/hid/gtk/pcb.rc \
195         $(srcdir)/hid/lesstif/hid.conf \
196         $(srcdir)/hid/lpr/hid.conf \
197         $(srcdir)/hid/png/hid.conf \
198         $(srcdir)/hid/nelma/hid.conf \
199         $(srcdir)/hid/ps/hid.conf \
200         gpcb-menu.res \
201         pcb-menu.res \
202         pcbtest.sh.in \
203         dbus.xml
205 AM_YFLAGS=      -d
207 all-local: pcbtest.sh
209 pcb-menu.h : pcb-menu.res
210         echo '/* AUTOMATICALLY GENERATED FROM pcb-menu.res DO NOT EDIT */' > $@
211         echo 'const char *pcb_menu_default[] = {' >> $@
212         sed 's/\\/\\\\/g; s/"/\\"/g; s/^/"/; s/$$/",/' < ${srcdir}/pcb-menu.res >> $@
213         echo '0};' >> $@
215 gpcb-menu.h : gpcb-menu.res
216         echo '/* AUTOMATICALLY GENERATED FROM gpcb-menu.res DO NOT EDIT */' > $@
217         echo 'const char *gpcb_menu_default[] = {' >> $@
218         sed 's/\\/\\\\/g; s/"/\\"/g; s/^/"/; s/$$/",/' < ${srcdir}/gpcb-menu.res >> $@
219         echo '0};' >> $@
221 hid/common/hidlist.h : Makefile
222         true > $@
223         for e in ${HIDLIST}; do \
224           echo "HID_DEF($${e})" >> $@; \
225         done
227 libgtk_a_CPPFLAGS = -I./hid/gtk
228 LIBGTK_SRCS = \
229         dolists.h \
230         hid/hidint.h \
231         hid/gtk/gtkhid-main.c \
232         hid/gtk/gtkhid.h \
233         hid/gtk/gui.h \
234         hid/gtk/gui-command-window.c \
235         hid/gtk/gui-config.c \
236         hid/gtk/gui-dialog-print.c \
237         hid/gtk/gui-dialog-size.c \
238         hid/gtk/gui-dialog.c \
239         hid/gtk/gui-keyref-window.c \
240         hid/gtk/gui-library-window.c \
241         hid/gtk/gui-library-window.h \
242         hid/gtk/gui-log-window.c \
243         hid/gtk/gui-misc.c \
244         hid/gtk/gui-netlist-window.c \
245         hid/gtk/gui-output-events.c \
246         hid/gtk/gui-pinout-preview.c \
247         hid/gtk/gui-pinout-preview.h \
248         hid/gtk/gui-pinout-window.c \
249         hid/gtk/gui-top-window.c \
250         hid/gtk/gui-utils.c
251 libgtk_a_SOURCES = ${LIBGTK_SRCS} hid/gtk/gtk_lists.h
253 hid/gtk/gtk_lists.h : ${LIBGTK_SRCS} Makefile
254         true > $@
255         (for f in ${LIBGTK_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
256         mv $@.tmp $@
258 # If we are building with dbus support, we need some extra files
259 if WITH_DBUS
260 dbus-introspect.h : dbus.xml Makefile
261         echo '/* AUTOMATICALLY GENERATED FROM dbus.xml DO NOT EDIT */' > $@.tmp
262         echo "static char *pcb_dbus_introspect_xml ="  > $@.tmp
263         sed 's/\\/\\\\/g; s/"/\\"/g; s/^/"/; s/$$/"/' < $(srcdir)/dbus.xml >> $@.tmp
264         echo ";" >> $@.tmp
265         mv $@.tmp $@
267 PCB_SRCS+=      ${DBUS_SRCS}
268 BUILT_SOURCES+= dbus-introspect.h
270 endif
272 # If we are building on win32, then compile in some icons for the
273 # desktop and application toolbar
274 if WIN32
275 pcb_icon.o : pcb_icon.ico $(srcdir)/hid/gtk/pcb.rc
276         $(WINDRES) $(srcdir)/hid/gtk/pcb.rc $@
278 pcb_icon.ico: $(top_srcdir)/data/pcb_icon.ico
279         cp $(top_srcdir)/data/pcb_icon.ico $@
281 pcb_LDADD+=                     pcb_icon.o
282 pcb_DEPENDENCIES+=      pcb_icon.o
284 endif
287 liblesstif_a_CPPFLAGS = -I./hid/lesstif
288 LIBLESSTIF_SRCS = \
289         dolists.h \
290         hid/hidint.h \
291         hid/lesstif/dialogs.c \
292         hid/lesstif/lesstif.h \
293         hid/lesstif/library.c \
294         hid/lesstif/main.c \
295         hid/lesstif/menu.c \
296         hid/lesstif/netlist.c \
297         hid/lesstif/styles.c \
298         hid/lesstif/xincludes.h 
299 liblesstif_a_SOURCES = ${LIBLESSTIF_SRCS} hid/lesstif/lesstif_lists.h
301 hid/lesstif/lesstif_lists.h : ${LIBLESSTIF_SRCS} Makefile
302         true > $@
303         (for f in ${LIBLESSTIF_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
304         mv $@.tmp $@
306 libbatch_a_CPPFLAGS = -I./hid/batch
307 LIBBATCH_SRCS = \
308         hid/hidint.h \
309         hid/batch/batch.c 
310 libbatch_a_SOURCES = ${LIBBATCH_SRCS} hid/batch/batch_lists.h
312 hid/batch/batch_lists.h : ${LIBBATCH_SRCS} Makefile
313         true > $@
314         (for f in ${LIBBATCH_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
315         mv $@.tmp $@
317 libgerber_a_SOURCES = \
318         hid/hidint.h \
319         hid/gerber/gerber.c
321 libbom_a_SOURCES = \
322         hid/hidint.h \
323         hid/bom/bom.c
325 libps_a_CPPFLAGS = -I./hid/ps
326 LIBPS_SRCS = \
327         dolists.h \
328         hid/hidint.h \
329         hid/ps/ps.c \
330         hid/ps/ps.h \
331         hid/ps/eps.c 
332 libps_a_SOURCES = ${LIBPS_SRCS} hid/ps/ps_lists.h
334 hid/ps/ps_lists.h : ${LIBPS_SRCS} Makefile
335         true > $@
336         (for f in ${LIBPS_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
337         mv $@.tmp $@
339 libpng_a_CPPFLAGS = -I./hid/png
340 LIBPNG_SRCS = \
341         dolists.h \
342         hid/hidint.h \
343         hid/png/png.c \
344         hid/png/png.h 
345 libpng_a_SOURCES = ${LIBPNG_SRCS} hid/png/png_lists.h
347 hid/png/png_lists.h : ${LIBPNG_SRCS} Makefile
348         true > $@
349         (for f in ${LIBPNG_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
350         mv $@.tmp $@
352 libnelma_a_CPPFLAGS = -I./hid/nelma
353 LIBNELMA_SRCS = \
354         dolists.h \
355         hid/hidint.h \
356         hid/nelma/nelma.c \
357         hid/nelma/nelma.h 
358 libnelma_a_SOURCES = ${LIBNELMA_SRCS} hid/nelma/nelma_lists.h
360 hid/nelma/nelma_lists.h : ${LIBNELMA_SRCS} Makefile
361         true > $@
362         (for f in ${LIBNELMA_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
363         mv $@.tmp $@
365 liblpr_a_SOURCES = \
366         hid/hidint.h \
367         hid/lpr/lpr.c
369 DISTCLEANFILES= pcbtest.sh gpcb-menu.h pcb-menu.h \
370         hid/batch/batch_lists.h \
371         hid/common/hidlist.h \
372         hid/gtk/gtk_lists.h \
373         hid/lesstif/lesstif_lists.h \
374         hid/png/png_lists.h \
375         hid/nelma/nelma_lists.h \
376         hid/ps/ps_lists.h \
377         core_lists.h \
378         dbus-introspect.h
381 # create wrapper script that lets you test pcb prior to installation
382 pcbtest.sh:     $(srcdir)/pcbtest.sh.in Makefile
383         sed -e 's;@BUILDDIR@;${abs_builddir};g' -e 's;@TOP_BUILDDIR@;${abs_top_builddir};g' \
384                 -e 's;@TOPSRCDIR@;${abs_top_srcdir};g' \
385                 $(srcdir)/pcbtest.sh.in > $@
386         chmod 755 $@