select.c: Remove Draw() call from SelectConnection
[geda-pcb/leaky.git] / src / Makefile.am
blobe287ae7ebb5460ad51cc27d672ecc7932ad58e55
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 \
16         libgcode.a
18 pcblib_DATA=    \
19         default_font \
20         gpcb-menu.res \
21         pcb-menu.res
23 bin_PROGRAMS=   pcb
25 if DEBUG_BUILD
26 # don't disable assert()
27 else
28 AM_CFLAGS = -DNDEBUG
29 endif
31 PCB_SRCS = \
32         action.c \
33         action.h \
34         autoplace.c \
35         autoplace.h \
36         autoroute.c \
37         autoroute.h \
38         box.h \
39         buffer.c \
40         buffer.h \
41         change.c \
42         change.h \
43         clip.c \
44         clip.h \
45         command.c \
46         command.h \
47         compat.c \
48         compat.h \
49         const.h \
50         copy.c \
51         copy.h \
52         create.c \
53         create.h \
54         crosshair.c \
55         crosshair.h \
56         data.c \
57         data.h \
58         djopt.c \
59         djopt.h \
60         dolists.h \
61         draw.c \
62         draw.h \
63         drill.c \
64         drill.h \
65         edif.y \
66         edif_parse.h \
67         error.c \
68         error.h \
69         file.c \
70         file.h \
71         find.c \
72         find.h \
73         flags.c \
74         fontmode.c \
75         free_atexit.c \
76         free_atexit.h \
77         global.h \
78         heap.c \
79         heap.h \
80         hid.h \
81         insert.c \
82         insert.h \
83         intersect.c \
84         intersect.h \
85         line.c \
86         line.h \
87         lrealpath.c \
88         lrealpath.h \
89         macro.h \
90         main.c \
91         mirror.c \
92         mirror.h \
93         misc.c \
94         misc.h \
95         move.c \
96         move.h \
97         mtspace.c \
98         mtspace.h \
99         mymem.c \
100         mymem.h \
101         netlist.c \
102         parse_l.h \
103         parse_l.l \
104         parse_y.h \
105         parse_y.y \
106         polygon.c \
107         polygon.h \
108         polygon1.c \
109         polyarea.h \
110         puller.c \
111         print.c \
112         print.h \
113         rats.c \
114         rats.h \
115         remove.c \
116         remove.h \
117         report.c \
118         report.h \
119         res_parse.y \
120         res_lex.l \
121         resource.h \
122         rotate.c \
123         rotate.h \
124         rtree.c \
125         rtree.h \
126         rubberband.c \
127         rubberband.h \
128         search.c \
129         search.h \
130         select.c \
131         select.h \
132         set.c \
133         set.h \
134         strflags.c \
135         strflags.h \
136         thermal.c \
137         thermal.h \
138         undo.c \
139         undo.h \
140         vector.c \
141         vector.h \
142         vendor.c \
143         vendor.h \
144         hid/common/actions.c \
145         hid/common/actions.h \
146         hid/common/flags.c \
147         hid/common/hidinit.c \
148         hid/common/hidinit.h \
149         hid/common/hidnogui.c \
150         hid/common/extents.c \
151         hid/common/draw_helpers.c \
152         hid/common/draw_helpers.h \
153         hid/common/hid_resource.c \
154         hid/common/hid_resource.h \
155         hid/hidint.h 
157 EXTRA_pcb_SOURCES = ${DBUS_SRCS} toporouter.c toporouter.h
158 DBUS_SRCS= \
159         dbus-pcbmain.c \
160         dbus-pcbmain.h \
161         dbus.h \
162         dbus.c
164 BUILT_SOURCES = \
165         core_lists.h \
166         gpcb-menu.h \
167         hid/gtk/gtk_lists.h \
168         hid/lesstif/lesstif_lists.h \
169         hid/batch/batch_lists.h \
170         hid/png/png_lists.h \
171         hid/gcode/gcode_lists.h \
172         hid/nelma/nelma_lists.h \
173         hid/ps/ps_lists.h \
174         parse_y.h \
175         pcb-menu.h \
176         res_parse.h \
177         hid/common/hidlist.h
179 pcb_LDADD = @HIDLIBS@
180 pcb_DEPENDENCIES = @HIDLIBS@
182 if WITH_TOPOROUTER
183 PCB_SRCS += toporouter.c toporouter.h
184 noinst_LIBRARIES += libgts.a
185 pcb_LDADD += libgts.a
186 pcb_DEPENDENCIES += libgts.a
187 endif
189 pcb_SOURCES = ${PCB_SRCS} core_lists.h
191 # Action, Attribute, and Flag lists.
192 core_lists.h : ${PCB_SRCS} Makefile
193         true > $@
194         (for f in ${PCB_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
195         mv $@.tmp $@
197 # for globalconst.h
198 INCLUDES=       -I$(top_srcdir) -I$(srcdir)/icons -I$(srcdir)/gts
200 DEFS=   -DLOCALEDIR=\"$(localedir)\" @DEFS@
202 EXTRA_DIST= \
203         check_icon.data \
204         default_font \
205         $(srcdir)/hid/batch/hid.conf \
206         $(srcdir)/hid/bom/hid.conf \
207         $(srcdir)/hid/gcode/hid.conf \
208         $(srcdir)/hid/gerber/hid.conf \
209         $(srcdir)/hid/gtk/gui-icons-misc.data \
210         $(srcdir)/hid/gtk/gui-icons-mode-buttons.data \
211         $(srcdir)/hid/gtk/hid.conf \
212         $(srcdir)/hid/gtk/pcb.rc \
213         $(srcdir)/hid/lesstif/hid.conf \
214         $(srcdir)/hid/lpr/hid.conf \
215         $(srcdir)/hid/png/hid.conf \
216         $(srcdir)/hid/nelma/hid.conf \
217         $(srcdir)/hid/ps/hid.conf \
218         gpcb-menu.res \
219         pcb-menu.res \
220         pcbtest.sh.in \
221         dbus.xml
223 AM_YFLAGS=      -d
225 all-local: pcbtest.sh
227 pcb-menu.h : pcb-menu.res
228         echo '/* AUTOMATICALLY GENERATED FROM pcb-menu.res DO NOT EDIT */' > $@
229         echo 'const char *pcb_menu_default[] = {' >> $@
230         sed 's/\\/\\\\/g; s/"/\\"/g; s/^/"/; s/$$/",/' < ${srcdir}/pcb-menu.res >> $@
231         echo '0};' >> $@
233 gpcb-menu.h : gpcb-menu.res
234         echo '/* AUTOMATICALLY GENERATED FROM gpcb-menu.res DO NOT EDIT */' > $@
235         echo 'const char *gpcb_menu_default[] = {' >> $@
236         sed 's/\\/\\\\/g; s/"/\\"/g; s/^/"/; s/$$/",/' < ${srcdir}/gpcb-menu.res >> $@
237         echo '0};' >> $@
239 hid/common/hidlist.h : Makefile
240         $(MKDIR_P) hid/common
241         true > $@
242         for e in ${HIDLIST}; do \
243           echo "HID_DEF($${e})" >> $@; \
244         done
246 libgtk_a_CPPFLAGS = -I./hid/gtk
247 LIBGTK_SRCS = \
248         dolists.h \
249         hid/hidint.h \
250         hid/gtk/gtkhid-main.c \
251         hid/gtk/gtkhid-gdk.c \
252         hid/gtk/gtkhid.h \
253         hid/gtk/gui.h \
254         hid/gtk/gui-command-window.c \
255         hid/gtk/gui-config.c \
256         hid/gtk/gui-dialog-print.c \
257         hid/gtk/gui-dialog-size.c \
258         hid/gtk/gui-dialog.c \
259         hid/gtk/gui-drc-window.c \
260         hid/gtk/gui-drc-window.h \
261         hid/gtk/gui-keyref-window.c \
262         hid/gtk/gui-library-window.c \
263         hid/gtk/gui-library-window.h \
264         hid/gtk/gui-log-window.c \
265         hid/gtk/gui-misc.c \
266         hid/gtk/gui-netlist-window.c \
267         hid/gtk/gui-output-events.c \
268         hid/gtk/gui-pinout-preview.c \
269         hid/gtk/gui-pinout-preview.h \
270         hid/gtk/gui-pinout-window.c \
271         hid/gtk/gui-render-pixmap.c \
272         hid/gtk/gui-top-window.c \
273         hid/gtk/gui-utils.c
274 libgtk_a_SOURCES = ${LIBGTK_SRCS} hid/gtk/gtk_lists.h
276 hid/gtk/gtk_lists.h : ${LIBGTK_SRCS} Makefile
277         $(MKDIR_P) hid/gtk
278         true > $@
279         (for f in ${LIBGTK_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
280         mv $@.tmp $@
282 # If we are building with dbus support, we need some extra files
283 if WITH_DBUS
284 dbus-introspect.h : dbus.xml Makefile
285         echo '/* AUTOMATICALLY GENERATED FROM dbus.xml DO NOT EDIT */' > $@.tmp
286         echo "static char *pcb_dbus_introspect_xml ="  > $@.tmp
287         sed 's/\\/\\\\/g; s/"/\\"/g; s/^/"/; s/$$/"/' < $(srcdir)/dbus.xml >> $@.tmp
288         echo ";" >> $@.tmp
289         mv $@.tmp $@
291 PCB_SRCS+=      ${DBUS_SRCS}
292 BUILT_SOURCES+= dbus-introspect.h
294 endif
296 # If we are building on win32, then compile in some icons for the
297 # desktop and application toolbar
298 if WIN32
299 pcb_icon.o : pcb_icon.ico $(srcdir)/hid/gtk/pcb.rc
300         $(WINDRES) $(srcdir)/hid/gtk/pcb.rc $@
302 pcb_icon.ico: $(top_srcdir)/data/pcb_icon.ico
303         cp $(top_srcdir)/data/pcb_icon.ico $@
305 pcb_LDADD+=                     pcb_icon.o
306 pcb_DEPENDENCIES+=      pcb_icon.o
308 endif
311 liblesstif_a_CPPFLAGS = -I./hid/lesstif
312 LIBLESSTIF_SRCS = \
313         dolists.h \
314         hid/hidint.h \
315         hid/lesstif/dialogs.c \
316         hid/lesstif/lesstif.h \
317         hid/lesstif/library.c \
318         hid/lesstif/main.c \
319         hid/lesstif/menu.c \
320         hid/lesstif/netlist.c \
321         hid/lesstif/styles.c \
322         hid/lesstif/xincludes.h 
323 liblesstif_a_SOURCES = ${LIBLESSTIF_SRCS} hid/lesstif/lesstif_lists.h
325 hid/lesstif/lesstif_lists.h : ${LIBLESSTIF_SRCS} Makefile
326         $(MKDIR_P) hid/lesstif
327         true > $@
328         (for f in ${LIBLESSTIF_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
329         mv $@.tmp $@
331 libgts_a_CPPFLAGS = -I./gts
332 LIBGTS_SRCS = \
333         gts/object.c \
334         gts/point.c \
335         gts/vertex.c \
336         gts/segment.c \
337         gts/edge.c \
338         gts/triangle.c \
339         gts/face.c \
340         gts/kdtree.c \
341         gts/bbtree.c \
342         gts/misc.c \
343         gts/gts-private.h \
344         gts/predicates.c \
345         gts/predicates.h \
346         gts/rounding.h \
347         gts/heap.c \
348         gts/eheap.c \
349         gts/fifo.c \
350         gts/gts.h \
351         gts/matrix.c \
352         gts/surface.c \
353         gts/stripe.c \
354         gts/vopt.c \
355         gts/refine.c \
356         gts/iso.c \
357         gts/isotetra.c \
358         gts/split.c \
359         gts/psurface.c \
360         gts/hsurface.c \
361         gts/cdt.c \
362         gts/boolean.c \
363         gts/named.c \
364         gts/oocs.c \
365         gts/container.c \
366         gts/graph.c \
367         gts/pgraph.c \
368         gts/partition.c \
369         gts/curvature.c \
370         gts/tribox3.c
371 libgts_a_SOURCES = ${LIBGTS_SRCS} gts/gts_lists.h
373 gts/gts_lists.h : ${LIBGTS_SRCS} Makefile
374         $(MKDIR_P) gts
375         true > $@
376 # Uncomment out the following if/when we ever end up with REGISTER in any of the gts
377 # source files.  For now, there aren't any and so the grep fails and make stops
378 #       (for f in ${LIBGTS_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
379 #       mv $@.tmp $@
381 libbatch_a_CPPFLAGS = -I./hid/batch
382 LIBBATCH_SRCS = \
383         hid/hidint.h \
384         hid/batch/batch.c 
385 libbatch_a_SOURCES = ${LIBBATCH_SRCS} hid/batch/batch_lists.h
387 hid/batch/batch_lists.h : ${LIBBATCH_SRCS} Makefile
388         $(MKDIR_P) hid/batch
389         true > $@
390         (for f in ${LIBBATCH_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
391         mv $@.tmp $@
393 libgerber_a_SOURCES = \
394         hid/hidint.h \
395         hid/gerber/gerber.c
397 libbom_a_SOURCES = \
398         hid/hidint.h \
399         hid/bom/bom.c
401 libps_a_CPPFLAGS = -I./hid/ps
402 LIBPS_SRCS = \
403         dolists.h \
404         hid/hidint.h \
405         hid/ps/ps.c \
406         hid/ps/ps.h \
407         hid/ps/eps.c 
408 libps_a_SOURCES = ${LIBPS_SRCS} hid/ps/ps_lists.h
410 hid/ps/ps_lists.h : ${LIBPS_SRCS} Makefile
411         $(MKDIR_P) hid/ps
412         true > $@
413         (for f in ${LIBPS_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
414         mv $@.tmp $@
416 libpng_a_CPPFLAGS = -I./hid/png
417 LIBPNG_SRCS = \
418         dolists.h \
419         hid/hidint.h \
420         hid/png/png.c \
421         hid/png/png.h 
422 libpng_a_SOURCES = ${LIBPNG_SRCS} hid/png/png_lists.h
424 hid/png/png_lists.h : ${LIBPNG_SRCS} Makefile
425         $(MKDIR_P) hid/png
426         true > $@
427         (for f in ${LIBPNG_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
428         mv $@.tmp $@
430 libgcode_a_CPPFLAGS = -I./hid/gcode
431 LIBGCODE_SRCS = \
432         dolists.h \
433         hid/hidint.h \
434         hid/gcode/gcode.c \
435         hid/gcode/gcode.h \
436         hid/gcode/decompose.c \
437         hid/gcode/decompose.h \
438         hid/gcode/trace.c \
439         hid/gcode/trace.h \
440         hid/gcode/curve.c \
441         hid/gcode/curve.h \
442         hid/gcode/auxiliary.h \
443         hid/gcode/bitmap.h \
444         hid/gcode/lists.h \
445         hid/gcode/potracelib.h 
446 libgcode_a_SOURCES = ${LIBGCODE_SRCS} hid/gcode/gcode_lists.h
448 hid/gcode/gcode_lists.h : ${LIBGCODE_SRCS} Makefile
449         $(MKDIR_P) hid/gcode
450         true > $@
451         (for f in ${LIBGCODE_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
452         mv $@.tmp $@
454 libnelma_a_CPPFLAGS = -I./hid/nelma
455 LIBNELMA_SRCS = \
456         dolists.h \
457         hid/hidint.h \
458         hid/nelma/nelma.c \
459         hid/nelma/nelma.h 
460 libnelma_a_SOURCES = ${LIBNELMA_SRCS} hid/nelma/nelma_lists.h
462 hid/nelma/nelma_lists.h : ${LIBNELMA_SRCS} Makefile
463         $(MKDIR_P) hid/nelma
464         true > $@
465         (for f in ${LIBNELMA_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
466         mv $@.tmp $@
468 liblpr_a_SOURCES = \
469         hid/hidint.h \
470         hid/lpr/lpr.c
472 DISTCLEANFILES= pcbtest.sh gpcb-menu.h pcb-menu.h \
473         hid/batch/batch_lists.h \
474         hid/common/hidlist.h \
475         hid/gtk/gtk_lists.h \
476         hid/lesstif/lesstif_lists.h \
477         hid/png/png_lists.h \
478         hid/gcode/gcode_lists.h \
479         hid/nelma/nelma_lists.h \
480         hid/ps/ps_lists.h \
481         gts/gts_lists.h \
482         core_lists.h \
483         dbus-introspect.h
485 # create wrapper script that lets you test pcb prior to installation
486 pcbtest.sh:     $(srcdir)/pcbtest.sh.in Makefile
487         sed -e 's;@BUILDDIR@;${abs_builddir};g' -e 's;@TOP_BUILDDIR@;${abs_top_builddir};g' \
488                 -e 's;@TOPSRCDIR@;${abs_top_srcdir};g' \
489                 $(srcdir)/pcbtest.sh.in > $@
490         chmod 755 $@