Pass r_NoHolesPolygonDicer a POLYAREA *, not a PLINE *
[geda-pcb/gde.git] / src / Makefile.am
blob1c97b60ef380404c3f183875b2a03796c5e70dee
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 libgts.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/common/hid_resource.c \
149         hid/common/hid_resource.h \
150         hid/hidint.h 
152 EXTRA_pcb_SOURCES = ${DBUS_SRCS} toporouter.c toporouter.h
153 DBUS_SRCS= \
154         dbus-pcbmain.c \
155         dbus-pcbmain.h \
156         dbus.h \
157         dbus.c
159 BUILT_SOURCES = \
160         core_lists.h \
161         gpcb-menu.h \
162         hid/gtk/gtk_lists.h \
163         hid/lesstif/lesstif_lists.h \
164         hid/batch/batch_lists.h \
165         hid/png/png_lists.h \
166         hid/nelma/nelma_lists.h \
167         hid/ps/ps_lists.h \
168         parse_y.h \
169         pcb-menu.h \
170         res_parse.h \
171         hid/common/hidlist.h
173 pcb_LDADD = @HIDLIBS@
174 pcb_DEPENDENCIES = @HIDLIBS@
176 if WITH_TOPOROUTER
177 PCB_SRCS += toporouter.c toporouter.h
178 noinst_LIBRARIES += libgts.a
179 pcb_LDADD += libgts.a
180 pcb_DEPENDENCIES += libgts.a
181 endif
183 pcb_SOURCES = ${PCB_SRCS} core_lists.h
185 # Action, Attribute, and Flag lists.
186 core_lists.h : ${PCB_SRCS} Makefile
187         true > $@
188         (for f in ${PCB_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
189         mv $@.tmp $@
191 # for globalconst.h
192 INCLUDES=       -I$(top_srcdir) -I$(srcdir)/icons -I$(srcdir)/gts
194 DEFS=   -DLOCALEDIR=\"$(localedir)\" @DEFS@
196 EXTRA_DIST= \
197         check_icon.data \
198         default_font \
199         $(srcdir)/hid/batch/hid.conf \
200         $(srcdir)/hid/bom/hid.conf \
201         $(srcdir)/hid/gerber/hid.conf \
202         $(srcdir)/hid/gtk/gui-icons-misc.data \
203         $(srcdir)/hid/gtk/gui-icons-mode-buttons.data \
204         $(srcdir)/hid/gtk/hid.conf \
205         $(srcdir)/hid/gtk/pcb.rc \
206         $(srcdir)/hid/lesstif/hid.conf \
207         $(srcdir)/hid/lpr/hid.conf \
208         $(srcdir)/hid/png/hid.conf \
209         $(srcdir)/hid/nelma/hid.conf \
210         $(srcdir)/hid/ps/hid.conf \
211         gpcb-menu.res \
212         pcb-menu.res \
213         pcbtest.sh.in \
214         dbus.xml
216 AM_YFLAGS=      -d
218 all-local: pcbtest.sh
220 pcb-menu.h : pcb-menu.res
221         echo '/* AUTOMATICALLY GENERATED FROM pcb-menu.res DO NOT EDIT */' > $@
222         echo 'const char *pcb_menu_default[] = {' >> $@
223         sed 's/\\/\\\\/g; s/"/\\"/g; s/^/"/; s/$$/",/' < ${srcdir}/pcb-menu.res >> $@
224         echo '0};' >> $@
226 gpcb-menu.h : gpcb-menu.res
227         echo '/* AUTOMATICALLY GENERATED FROM gpcb-menu.res DO NOT EDIT */' > $@
228         echo 'const char *gpcb_menu_default[] = {' >> $@
229         sed 's/\\/\\\\/g; s/"/\\"/g; s/^/"/; s/$$/",/' < ${srcdir}/gpcb-menu.res >> $@
230         echo '0};' >> $@
232 hid/common/hidlist.h : Makefile
233         true > $@
234         for e in ${HIDLIST}; do \
235           echo "HID_DEF($${e})" >> $@; \
236         done
238 libgtk_a_CPPFLAGS = -I./hid/gtk
239 LIBGTK_SRCS = \
240         dolists.h \
241         hid/hidint.h \
242         hid/gtk/gtkhid-main.c \
243         hid/gtk/gtkhid.h \
244         hid/gtk/gui.h \
245         hid/gtk/gui-command-window.c \
246         hid/gtk/gui-config.c \
247         hid/gtk/gui-dialog-print.c \
248         hid/gtk/gui-dialog-size.c \
249         hid/gtk/gui-dialog.c \
250         hid/gtk/gui-drc-window.c \
251         hid/gtk/gui-drc-window.h \
252         hid/gtk/gui-keyref-window.c \
253         hid/gtk/gui-library-window.c \
254         hid/gtk/gui-library-window.h \
255         hid/gtk/gui-log-window.c \
256         hid/gtk/gui-misc.c \
257         hid/gtk/gui-netlist-window.c \
258         hid/gtk/gui-output-events.c \
259         hid/gtk/gui-pinout-preview.c \
260         hid/gtk/gui-pinout-preview.h \
261         hid/gtk/gui-pinout-window.c \
262         hid/gtk/gui-render-pixmap.c \
263         hid/gtk/gui-top-window.c \
264         hid/gtk/gui-utils.c
265 libgtk_a_SOURCES = ${LIBGTK_SRCS} hid/gtk/gtk_lists.h
267 hid/gtk/gtk_lists.h : ${LIBGTK_SRCS} Makefile
268         true > $@
269         (for f in ${LIBGTK_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
270         mv $@.tmp $@
272 # If we are building with dbus support, we need some extra files
273 if WITH_DBUS
274 dbus-introspect.h : dbus.xml Makefile
275         echo '/* AUTOMATICALLY GENERATED FROM dbus.xml DO NOT EDIT */' > $@.tmp
276         echo "static char *pcb_dbus_introspect_xml ="  > $@.tmp
277         sed 's/\\/\\\\/g; s/"/\\"/g; s/^/"/; s/$$/"/' < $(srcdir)/dbus.xml >> $@.tmp
278         echo ";" >> $@.tmp
279         mv $@.tmp $@
281 PCB_SRCS+=      ${DBUS_SRCS}
282 BUILT_SOURCES+= dbus-introspect.h
284 endif
286 # If we are building on win32, then compile in some icons for the
287 # desktop and application toolbar
288 if WIN32
289 pcb_icon.o : pcb_icon.ico $(srcdir)/hid/gtk/pcb.rc
290         $(WINDRES) $(srcdir)/hid/gtk/pcb.rc $@
292 pcb_icon.ico: $(top_srcdir)/data/pcb_icon.ico
293         cp $(top_srcdir)/data/pcb_icon.ico $@
295 pcb_LDADD+=                     pcb_icon.o
296 pcb_DEPENDENCIES+=      pcb_icon.o
298 endif
301 liblesstif_a_CPPFLAGS = -I./hid/lesstif
302 LIBLESSTIF_SRCS = \
303         dolists.h \
304         hid/hidint.h \
305         hid/lesstif/dialogs.c \
306         hid/lesstif/lesstif.h \
307         hid/lesstif/library.c \
308         hid/lesstif/main.c \
309         hid/lesstif/menu.c \
310         hid/lesstif/netlist.c \
311         hid/lesstif/styles.c \
312         hid/lesstif/xincludes.h 
313 liblesstif_a_SOURCES = ${LIBLESSTIF_SRCS} hid/lesstif/lesstif_lists.h
315 hid/lesstif/lesstif_lists.h : ${LIBLESSTIF_SRCS} Makefile
316         true > $@
317         (for f in ${LIBLESSTIF_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
318         mv $@.tmp $@
320 libgts_a_CPPFLAGS = -I./gts
321 LIBGTS_SRCS = \
322         gts/object.c \
323         gts/point.c \
324         gts/vertex.c \
325         gts/segment.c \
326         gts/edge.c \
327         gts/triangle.c \
328         gts/face.c \
329         gts/kdtree.c \
330         gts/bbtree.c \
331         gts/misc.c \
332         gts/gts-private.h \
333         gts/predicates.c \
334         gts/predicates.h \
335         gts/rounding.h \
336         gts/heap.c \
337         gts/eheap.c \
338         gts/fifo.c \
339         gts/gts.h \
340         gts/matrix.c \
341         gts/surface.c \
342         gts/stripe.c \
343         gts/vopt.c \
344         gts/refine.c \
345         gts/iso.c \
346         gts/isotetra.c \
347         gts/split.c \
348         gts/psurface.c \
349         gts/hsurface.c \
350         gts/cdt.c \
351         gts/boolean.c \
352         gts/named.c \
353         gts/oocs.c \
354         gts/container.c \
355         gts/graph.c \
356         gts/pgraph.c \
357         gts/partition.c \
358         gts/curvature.c \
359         gts/tribox3.c
360 libgts_a_SOURCES = ${LIBGTS_SRCS} gts/gts_lists.h
362 gts/gts_lists.h : ${LIBGTS_SRCS} Makefile
363         true > $@
364 # Uncomment out the following if/when we ever end up with REGISTER in any of the gts
365 # source files.  For now, there aren't any and so the grep fails and make stops
366 #       (for f in ${LIBGTS_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
367 #       mv $@.tmp $@
369 libbatch_a_CPPFLAGS = -I./hid/batch
370 LIBBATCH_SRCS = \
371         hid/hidint.h \
372         hid/batch/batch.c 
373 libbatch_a_SOURCES = ${LIBBATCH_SRCS} hid/batch/batch_lists.h
375 hid/batch/batch_lists.h : ${LIBBATCH_SRCS} Makefile
376         true > $@
377         (for f in ${LIBBATCH_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
378         mv $@.tmp $@
380 libgerber_a_SOURCES = \
381         hid/hidint.h \
382         hid/gerber/gerber.c
384 libbom_a_SOURCES = \
385         hid/hidint.h \
386         hid/bom/bom.c
388 libps_a_CPPFLAGS = -I./hid/ps
389 LIBPS_SRCS = \
390         dolists.h \
391         hid/hidint.h \
392         hid/ps/ps.c \
393         hid/ps/ps.h \
394         hid/ps/eps.c 
395 libps_a_SOURCES = ${LIBPS_SRCS} hid/ps/ps_lists.h
397 hid/ps/ps_lists.h : ${LIBPS_SRCS} Makefile
398         true > $@
399         (for f in ${LIBPS_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
400         mv $@.tmp $@
402 libpng_a_CPPFLAGS = -I./hid/png
403 LIBPNG_SRCS = \
404         dolists.h \
405         hid/hidint.h \
406         hid/png/png.c \
407         hid/png/png.h 
408 libpng_a_SOURCES = ${LIBPNG_SRCS} hid/png/png_lists.h
410 hid/png/png_lists.h : ${LIBPNG_SRCS} Makefile
411         true > $@
412         (for f in ${LIBPNG_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
413         mv $@.tmp $@
415 libnelma_a_CPPFLAGS = -I./hid/nelma
416 LIBNELMA_SRCS = \
417         dolists.h \
418         hid/hidint.h \
419         hid/nelma/nelma.c \
420         hid/nelma/nelma.h 
421 libnelma_a_SOURCES = ${LIBNELMA_SRCS} hid/nelma/nelma_lists.h
423 hid/nelma/nelma_lists.h : ${LIBNELMA_SRCS} Makefile
424         true > $@
425         (for f in ${LIBNELMA_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
426         mv $@.tmp $@
428 liblpr_a_SOURCES = \
429         hid/hidint.h \
430         hid/lpr/lpr.c
432 DISTCLEANFILES= pcbtest.sh gpcb-menu.h pcb-menu.h \
433         hid/batch/batch_lists.h \
434         hid/common/hidlist.h \
435         hid/gtk/gtk_lists.h \
436         hid/lesstif/lesstif_lists.h \
437         hid/png/png_lists.h \
438         hid/nelma/nelma_lists.h \
439         hid/ps/ps_lists.h \
440         gts/gts_lists.h \
441         core_lists.h \
442         dbus-introspect.h
444 # create wrapper script that lets you test pcb prior to installation
445 pcbtest.sh:     $(srcdir)/pcbtest.sh.in Makefile
446         sed -e 's;@BUILDDIR@;${abs_builddir};g' -e 's;@TOP_BUILDDIR@;${abs_top_builddir};g' \
447                 -e 's;@TOPSRCDIR@;${abs_top_srcdir};g' \
448                 $(srcdir)/pcbtest.sh.in > $@
449         chmod 755 $@