7 pcbtreedir= @PCBTREEDIR@
10 AUTOMAKE_OPTIONS = subdir-objects
12 noinst_LIBRARIES = @HIDLIBS@
14 libgtk.a liblesstif.a libbatch.a \
15 liblpr.a libgerber.a libbom.a libpng.a libps.a libnelma.a \
16 libgcode.a libipcd356.a
26 # don't disable assert()
151 hid/common/actions.c \
152 hid/common/actions.h \
154 hid/common/hidinit.c \
155 hid/common/hidinit.h \
156 hid/common/hidnogui.c \
157 hid/common/hidnogui.h \
158 hid/common/extents.c \
159 hid/common/draw_helpers.c \
160 hid/common/draw_helpers.h \
161 hid/common/hid_resource.c \
162 hid/common/hid_resource.h \
165 EXTRA_pcb_SOURCES = ${DBUS_SRCS} ${GL_SRCS} toporouter.c toporouter.h
176 hid/gtk/gtkhid-gl.c \
177 hid/gtk/gui-trackball.c \
178 hid/gtk/gui-trackball.h
183 hid/common/trackball.c \
184 hid/common/trackball.h
189 hid/gtk/gtk_lists.h \
190 hid/lesstif/lesstif_lists.h \
191 hid/batch/batch_lists.h \
192 hid/png/png_lists.h \
193 hid/gcode/gcode_lists.h \
194 hid/nelma/nelma_lists.h \
201 pcb_LDADD = @HIDLIBS@
202 pcb_DEPENDENCIES = @HIDLIBS@
205 PCB_SRCS += toporouter.c toporouter.h
206 pcb_LDADD += ../gts/libgts.a
207 pcb_DEPENDENCIES += ../gts/libgts.a
210 # All these -I$(top_srcdir) in this file are for globalconst.h.
211 pcb_CPPFLAGS = -I$(top_srcdir)
212 pcb_SOURCES = ${PCB_SRCS} core_lists.h
218 unittest_CPPFLAGS = -I$(top_srcdir) -DPCB_UNIT_TEST
219 unittest_SOURCES = ${TEST_SRCS}
220 check_PROGRAMS = unittest
221 check_SCRIPTS = unittest
224 # Action, Attribute, and Flag lists.
225 core_lists.h : ${PCB_SRCS} Makefile
227 (for f in ${PCB_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
231 INCLUDES= -I$(top_srcdir) -I$(srcdir)/icons -I$(srcdir)/../gts
233 DEFS= -DLOCALEDIR=\"$(localedir)\" @DEFS@
238 $(srcdir)/hid/batch/hid.conf \
239 $(srcdir)/hid/bom/hid.conf \
240 $(srcdir)/hid/gcode/hid.conf \
241 $(srcdir)/hid/gerber/hid.conf \
242 $(srcdir)/hid/gtk/gui-icons-misc.data \
243 $(srcdir)/hid/gtk/gui-icons-mode-buttons.data \
244 $(srcdir)/hid/gtk/hid.conf \
245 $(srcdir)/hid/gtk/pcb.rc \
246 $(srcdir)/hid/ipcd356/hid.conf \
247 $(srcdir)/hid/lesstif/hid.conf \
248 $(srcdir)/hid/lpr/hid.conf \
249 $(srcdir)/hid/png/hid.conf \
250 $(srcdir)/hid/nelma/hid.conf \
251 $(srcdir)/hid/ps/hid.conf \
261 all-local: pcbtest.sh
263 pcb-menu.res : pcb-menu.res.in
264 echo '/* AUTOMATICALLY GENERATED FROM pcb-menu.res.in DO NOT EDIT */' > $@
265 cat ${srcdir}/pcb-menu.res.in >> $@
267 pcb-menu.h : pcb-menu.res
268 echo '/* AUTOMATICALLY GENERATED FROM pcb-menu.res DO NOT EDIT */' > $@
269 echo 'const char *pcb_menu_default[] = {' >> $@
270 sed 's/\\/\\\\/g; s/"/\\"/g; s/^/"/; s/$$/",/' < pcb-menu.res >> $@
273 gpcb-menu.res : gpcb-menu.res.in
274 echo '/* AUTOMATICALLY GENERATED FROM gpcb-menu.res.in DO NOT EDIT */' > $@
275 cat ${srcdir}/gpcb-menu.res.in >> $@
277 gpcb-menu.h : gpcb-menu.res
278 echo '/* AUTOMATICALLY GENERATED FROM gpcb-menu.res DO NOT EDIT */' > $@
279 echo 'const char *gpcb_menu_default[] = {' >> $@
280 sed 's/\\/\\\\/g; s/"/\\"/g; s/^/"/; s/$$/",/' < gpcb-menu.res >> $@
285 $(INTLTOOL_EXTRACT) --type=gettext/quoted $^
286 mv -f $@ ${srcdir}/$@ || true
288 check-local: gpcb-menu.res.h pcb-menu.res.h
290 hid/common/hidlist.h : Makefile
291 $(MKDIR_P) hid/common
293 for e in ${HIDLIST}; do \
294 echo "HID_DEF($${e})" >> $@; \
297 libgtk_a_CPPFLAGS = -I$(top_srcdir) -I./hid/gtk
301 hid/gtk/ghid-cell-renderer-visibility.c \
302 hid/gtk/ghid-cell-renderer-visibility.h \
303 hid/gtk/ghid-coord-entry.c \
304 hid/gtk/ghid-coord-entry.h \
305 hid/gtk/ghid-layer-selector.c \
306 hid/gtk/ghid-layer-selector.h \
307 hid/gtk/ghid-main-menu.c \
308 hid/gtk/ghid-main-menu.h \
309 hid/gtk/ghid-route-style-selector.c \
310 hid/gtk/ghid-route-style-selector.h \
311 hid/gtk/gtkhid-main.c \
314 hid/gtk/gui-command-window.c \
315 hid/gtk/gui-config.c \
316 hid/gtk/gui-dialog-print.c \
317 hid/gtk/gui-dialog.c \
318 hid/gtk/gui-drc-window.c \
319 hid/gtk/gui-drc-window.h \
320 hid/gtk/gui-keyref-window.c \
321 hid/gtk/gui-library-window.c \
322 hid/gtk/gui-library-window.h \
323 hid/gtk/gui-log-window.c \
325 hid/gtk/gui-netlist-window.c \
326 hid/gtk/gui-output-events.c \
327 hid/gtk/gui-pinout-preview.c \
328 hid/gtk/gui-pinout-preview.h \
329 hid/gtk/gui-pinout-window.c \
330 hid/gtk/gui-top-window.c \
332 libgtk_a_SOURCES = ${LIBGTK_SRCS} hid/gtk/gtk_lists.h
334 hid/gtk/gtk_lists.h : ${LIBGTK_SRCS} Makefile
337 (for f in ${LIBGTK_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
340 # If we are building with dbus support, we need some extra files
342 dbus-introspect.h : dbus.xml Makefile
343 echo '/* AUTOMATICALLY GENERATED FROM dbus.xml DO NOT EDIT */' > $@.tmp
344 echo "static char *pcb_dbus_introspect_xml =" > $@.tmp
345 sed 's/\\/\\\\/g; s/"/\\"/g; s/^/"/; s/$$/"/' < $(srcdir)/dbus.xml >> $@.tmp
349 PCB_SRCS+= ${DBUS_SRCS}
350 BUILT_SOURCES+= dbus-introspect.h
353 # If we are building with GL support, we need some extra files
355 PCB_SRCS+= ${GL_SRCS}
356 LIBGTK_SRCS+= ${LIBGTK_GL_SRCS}
358 LIBGTK_SRCS+= ${LIBGTK_GDK_SRCS}
361 # If we are building on win32, then compile in some icons for the
362 # desktop and application toolbar
364 pcb_icon.o : pcb_icon.ico $(srcdir)/hid/gtk/pcb.rc
365 $(WINDRES) $(srcdir)/hid/gtk/pcb.rc $@
367 pcb_icon.ico: $(top_srcdir)/data/pcb_icon.ico
368 cp $(top_srcdir)/data/pcb_icon.ico $@
370 pcb_LDADD+= pcb_icon.o
371 pcb_DEPENDENCIES+= pcb_icon.o
374 liblesstif_a_CPPFLAGS = -I$(top_srcdir) -I./hid/lesstif
378 hid/lesstif/dialogs.c \
379 hid/lesstif/lesstif.h \
380 hid/lesstif/library.c \
383 hid/lesstif/netlist.c \
384 hid/lesstif/styles.c \
385 hid/lesstif/xincludes.h
386 liblesstif_a_SOURCES = ${LIBLESSTIF_SRCS} hid/lesstif/lesstif_lists.h
388 hid/lesstif/lesstif_lists.h : ${LIBLESSTIF_SRCS} Makefile
389 $(MKDIR_P) hid/lesstif
391 (for f in ${LIBLESSTIF_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
394 libbatch_a_CPPFLAGS = -I$(top_srcdir) -I./hid/batch
398 libbatch_a_SOURCES = ${LIBBATCH_SRCS} hid/batch/batch_lists.h
400 hid/batch/batch_lists.h : ${LIBBATCH_SRCS} Makefile
403 (for f in ${LIBBATCH_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
406 libgerber_a_CPPFLAGS = -I$(top_srcdir)
407 libgerber_a_SOURCES = \
411 libbom_a_CPPFLAGS = -I$(top_srcdir)
416 libipcd356_a_CPPFLAGS = -I$(top_srcdir)
417 libipcd356_a_SOURCES = \
419 hid/ipcd356/ipcd356.c
421 libps_a_CPPFLAGS = -I$(top_srcdir) -I./hid/ps
428 libps_a_SOURCES = ${LIBPS_SRCS} hid/ps/ps_lists.h
430 hid/ps/ps_lists.h : ${LIBPS_SRCS} Makefile
433 (for f in ${LIBPS_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
436 libpng_a_CPPFLAGS = -I$(top_srcdir) -I./hid/png
442 libpng_a_SOURCES = ${LIBPNG_SRCS} hid/png/png_lists.h
444 hid/png/png_lists.h : ${LIBPNG_SRCS} Makefile
447 (for f in ${LIBPNG_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
450 libgcode_a_CPPFLAGS = -I$(top_srcdir) -I./hid/gcode
455 hid/gcode/decompose.c \
456 hid/gcode/decompose.h \
461 hid/gcode/auxiliary.h \
464 hid/gcode/potracelib.h
465 libgcode_a_SOURCES = ${LIBGCODE_SRCS} hid/gcode/gcode_lists.h
467 hid/gcode/gcode_lists.h : ${LIBGCODE_SRCS} Makefile
470 (for f in ${LIBGCODE_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
473 libnelma_a_CPPFLAGS = -I$(top_srcdir) -I./hid/nelma
478 libnelma_a_SOURCES = ${LIBNELMA_SRCS} hid/nelma/nelma_lists.h
480 hid/nelma/nelma_lists.h : ${LIBNELMA_SRCS} Makefile
483 (for f in ${LIBNELMA_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
486 liblpr_a_CPPFLAGS = -I$(top_srcdir)
491 DISTCLEANFILES= pcbtest.sh gpcb-menu.h pcb-menu.h \
492 hid/batch/batch_lists.h \
493 hid/common/hidlist.h \
494 hid/gtk/gtk_lists.h \
495 hid/lesstif/lesstif_lists.h \
496 hid/png/png_lists.h \
497 hid/gcode/gcode_lists.h \
498 hid/nelma/nelma_lists.h \
507 # create wrapper script that lets you test pcb prior to installation
508 pcbtest.sh: $(srcdir)/pcbtest.sh.in Makefile
509 sed -e 's;@BUILDDIR@;${abs_builddir};g' -e 's;@TOP_BUILDDIR@;${abs_top_builddir};g' \
510 -e 's;@TOPSRCDIR@;${abs_top_srcdir};g' \
511 $(srcdir)/pcbtest.sh.in > $@