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 \
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
208 # All these -I$(top_srcdir) in this file are for globalconst.h.
209 pcb_CPPFLAGS = -I$(top_srcdir)
210 pcb_SOURCES = ${PCB_SRCS} core_lists.h
216 unittest_CPPFLAGS = -I$(top_srcdir) -DPCB_UNIT_TEST
217 unittest_SOURCES = ${TEST_SRCS}
218 check_PROGRAMS = unittest
219 check_SCRIPTS = unittest
222 # Action, Attribute, and Flag lists.
223 core_lists.h : ${PCB_SRCS} Makefile
225 (for f in ${PCB_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
228 DEFS= -DLOCALEDIR=\"$(localedir)\" @DEFS@
233 $(srcdir)/hid/batch/hid.conf \
234 $(srcdir)/hid/bom/hid.conf \
235 $(srcdir)/hid/gcode/hid.conf \
236 $(srcdir)/hid/gerber/hid.conf \
237 $(srcdir)/hid/gtk/gui-icons-misc.data \
238 $(srcdir)/hid/gtk/gui-icons-mode-buttons.data \
239 $(srcdir)/hid/gtk/hid.conf \
240 $(srcdir)/hid/gtk/pcb.rc \
241 $(srcdir)/hid/lesstif/hid.conf \
242 $(srcdir)/hid/lpr/hid.conf \
243 $(srcdir)/hid/png/hid.conf \
244 $(srcdir)/hid/nelma/hid.conf \
245 $(srcdir)/hid/ps/hid.conf \
255 all-local: pcbtest.sh
257 pcb-menu.res : pcb-menu.res.in
258 echo '/* AUTOMATICALLY GENERATED FROM pcb-menu.res.in DO NOT EDIT */' > $@
259 cat ${srcdir}/pcb-menu.res.in >> $@
261 pcb-menu.h : pcb-menu.res
262 echo '/* AUTOMATICALLY GENERATED FROM pcb-menu.res DO NOT EDIT */' > $@
263 echo 'const char *pcb_menu_default[] = {' >> $@
264 sed 's/\\/\\\\/g; s/"/\\"/g; s/^/"/; s/$$/",/' < pcb-menu.res >> $@
267 gpcb-menu.res : gpcb-menu.res.in
268 echo '/* AUTOMATICALLY GENERATED FROM gpcb-menu.res.in DO NOT EDIT */' > $@
269 cat ${srcdir}/gpcb-menu.res.in >> $@
271 gpcb-menu.h : gpcb-menu.res
272 echo '/* AUTOMATICALLY GENERATED FROM gpcb-menu.res DO NOT EDIT */' > $@
273 echo 'const char *gpcb_menu_default[] = {' >> $@
274 sed 's/\\/\\\\/g; s/"/\\"/g; s/^/"/; s/$$/",/' < gpcb-menu.res >> $@
279 $(INTLTOOL_EXTRACT) --type=gettext/quoted $^
280 mv -f $@ ${srcdir}/$@ || true
282 check-local: gpcb-menu.res.h pcb-menu.res.h
284 hid/common/hidlist.h : Makefile
285 $(MKDIR_P) hid/common
287 for e in ${HIDLIST}; do \
288 echo "HID_DEF($${e})" >> $@; \
291 libgtk_a_CPPFLAGS = -I$(top_srcdir) -I./hid/gtk
295 hid/gtk/ghid-cell-renderer-visibility.c \
296 hid/gtk/ghid-cell-renderer-visibility.h \
297 hid/gtk/ghid-coord-entry.c \
298 hid/gtk/ghid-coord-entry.h \
299 hid/gtk/ghid-layer-selector.c \
300 hid/gtk/ghid-layer-selector.h \
301 hid/gtk/ghid-main-menu.c \
302 hid/gtk/ghid-main-menu.h \
303 hid/gtk/ghid-route-style-selector.c \
304 hid/gtk/ghid-route-style-selector.h \
305 hid/gtk/gtkhid-main.c \
308 hid/gtk/gui-command-window.c \
309 hid/gtk/gui-config.c \
310 hid/gtk/gui-dialog-print.c \
311 hid/gtk/gui-dialog.c \
312 hid/gtk/gui-drc-window.c \
313 hid/gtk/gui-drc-window.h \
314 hid/gtk/gui-keyref-window.c \
315 hid/gtk/gui-library-window.c \
316 hid/gtk/gui-library-window.h \
317 hid/gtk/gui-log-window.c \
319 hid/gtk/gui-netlist-window.c \
320 hid/gtk/gui-output-events.c \
321 hid/gtk/gui-pinout-preview.c \
322 hid/gtk/gui-pinout-preview.h \
323 hid/gtk/gui-pinout-window.c \
324 hid/gtk/gui-top-window.c \
326 libgtk_a_SOURCES = ${LIBGTK_SRCS} hid/gtk/gtk_lists.h
328 hid/gtk/gtk_lists.h : ${LIBGTK_SRCS} Makefile
331 (for f in ${LIBGTK_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
334 # If we are building with dbus support, we need some extra files
336 dbus-introspect.h : dbus.xml Makefile
337 echo '/* AUTOMATICALLY GENERATED FROM dbus.xml DO NOT EDIT */' > $@.tmp
338 echo "static char *pcb_dbus_introspect_xml =" > $@.tmp
339 sed 's/\\/\\\\/g; s/"/\\"/g; s/^/"/; s/$$/"/' < $(srcdir)/dbus.xml >> $@.tmp
343 PCB_SRCS+= ${DBUS_SRCS}
344 BUILT_SOURCES+= dbus-introspect.h
347 # If we are building with GL support, we need some extra files
349 PCB_SRCS+= ${GL_SRCS}
350 LIBGTK_SRCS+= ${LIBGTK_GL_SRCS}
352 LIBGTK_SRCS+= ${LIBGTK_GDK_SRCS}
355 # If we are building on win32, then compile in some icons for the
356 # desktop and application toolbar
358 pcb_icon.o : pcb_icon.ico $(srcdir)/hid/gtk/pcb.rc
359 $(WINDRES) $(srcdir)/hid/gtk/pcb.rc $@
361 pcb_icon.ico: $(top_srcdir)/data/pcb_icon.ico
362 cp $(top_srcdir)/data/pcb_icon.ico $@
364 pcb_LDADD+= pcb_icon.o
365 pcb_DEPENDENCIES+= pcb_icon.o
368 liblesstif_a_CPPFLAGS = -I$(top_srcdir) -I./hid/lesstif
372 hid/lesstif/dialogs.c \
373 hid/lesstif/lesstif.h \
374 hid/lesstif/library.c \
377 hid/lesstif/netlist.c \
378 hid/lesstif/styles.c \
379 hid/lesstif/xincludes.h
380 liblesstif_a_SOURCES = ${LIBLESSTIF_SRCS} hid/lesstif/lesstif_lists.h
382 hid/lesstif/lesstif_lists.h : ${LIBLESSTIF_SRCS} Makefile
383 $(MKDIR_P) hid/lesstif
385 (for f in ${LIBLESSTIF_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
388 libbatch_a_CPPFLAGS = -I$(top_srcdir) -I./hid/batch
392 libbatch_a_SOURCES = ${LIBBATCH_SRCS} hid/batch/batch_lists.h
394 hid/batch/batch_lists.h : ${LIBBATCH_SRCS} Makefile
397 (for f in ${LIBBATCH_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
400 libgerber_a_CPPFLAGS = -I$(top_srcdir)
401 libgerber_a_SOURCES = \
405 libbom_a_CPPFLAGS = -I$(top_srcdir)
410 libps_a_CPPFLAGS = -I$(top_srcdir) -I./hid/ps
417 libps_a_SOURCES = ${LIBPS_SRCS} hid/ps/ps_lists.h
419 hid/ps/ps_lists.h : ${LIBPS_SRCS} Makefile
422 (for f in ${LIBPS_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
425 libpng_a_CPPFLAGS = -I$(top_srcdir) -I./hid/png
431 libpng_a_SOURCES = ${LIBPNG_SRCS} hid/png/png_lists.h
433 hid/png/png_lists.h : ${LIBPNG_SRCS} Makefile
436 (for f in ${LIBPNG_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
439 libgcode_a_CPPFLAGS = -I$(top_srcdir) -I./hid/gcode
444 hid/gcode/decompose.c \
445 hid/gcode/decompose.h \
450 hid/gcode/auxiliary.h \
453 hid/gcode/potracelib.h
454 libgcode_a_SOURCES = ${LIBGCODE_SRCS} hid/gcode/gcode_lists.h
456 hid/gcode/gcode_lists.h : ${LIBGCODE_SRCS} Makefile
459 (for f in ${LIBGCODE_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
462 libnelma_a_CPPFLAGS = -I$(top_srcdir) -I./hid/nelma
467 libnelma_a_SOURCES = ${LIBNELMA_SRCS} hid/nelma/nelma_lists.h
469 hid/nelma/nelma_lists.h : ${LIBNELMA_SRCS} Makefile
472 (for f in ${LIBNELMA_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
475 liblpr_a_CPPFLAGS = -I$(top_srcdir)
480 DISTCLEANFILES= pcbtest.sh gpcb-menu.h pcb-menu.h \
481 hid/batch/batch_lists.h \
482 hid/common/hidlist.h \
483 hid/gtk/gtk_lists.h \
484 hid/lesstif/lesstif_lists.h \
485 hid/png/png_lists.h \
486 hid/gcode/gcode_lists.h \
487 hid/nelma/nelma_lists.h \
496 # create wrapper script that lets you test pcb prior to installation
497 pcbtest.sh: $(srcdir)/pcbtest.sh.in Makefile
498 sed -e 's;@BUILDDIR@;${abs_builddir};g' -e 's;@TOP_BUILDDIR@;${abs_top_builddir};g' \
499 -e 's;@TOPSRCDIR@;${abs_top_srcdir};g' \
500 $(srcdir)/pcbtest.sh.in > $@