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 libgts.a \
26 # don't disable assert()
144 hid/common/actions.c \
145 hid/common/actions.h \
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 \
157 EXTRA_pcb_SOURCES = ${DBUS_SRCS} toporouter.c toporouter.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 \
179 pcb_LDADD = @HIDLIBS@
180 pcb_DEPENDENCIES = @HIDLIBS@
183 PCB_SRCS += toporouter.c toporouter.h
184 noinst_LIBRARIES += libgts.a
185 pcb_LDADD += libgts.a
186 pcb_DEPENDENCIES += libgts.a
189 pcb_SOURCES = ${PCB_SRCS} core_lists.h
191 # Action, Attribute, and Flag lists.
192 core_lists.h : ${PCB_SRCS} Makefile
194 (for f in ${PCB_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
198 INCLUDES= -I$(top_srcdir) -I$(srcdir)/icons -I$(srcdir)/gts
200 DEFS= -DLOCALEDIR=\"$(localedir)\" @DEFS@
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 \
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 >> $@
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 >> $@
239 hid/common/hidlist.h : Makefile
240 $(MKDIR_P) hid/common
242 for e in ${HIDLIST}; do \
243 echo "HID_DEF($${e})" >> $@; \
246 libgtk_a_CPPFLAGS = -I./hid/gtk
250 hid/gtk/gtkhid-main.c \
251 hid/gtk/gtkhid-gdk.c \
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 \
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 \
274 libgtk_a_SOURCES = ${LIBGTK_SRCS} hid/gtk/gtk_lists.h
276 hid/gtk/gtk_lists.h : ${LIBGTK_SRCS} Makefile
279 (for f in ${LIBGTK_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
282 # If we are building with dbus support, we need some extra files
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
291 PCB_SRCS+= ${DBUS_SRCS}
292 BUILT_SOURCES+= dbus-introspect.h
296 # If we are building on win32, then compile in some icons for the
297 # desktop and application toolbar
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
311 liblesstif_a_CPPFLAGS = -I./hid/lesstif
315 hid/lesstif/dialogs.c \
316 hid/lesstif/lesstif.h \
317 hid/lesstif/library.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
328 (for f in ${LIBLESSTIF_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
331 libgts_a_CPPFLAGS = -I./gts
371 libgts_a_SOURCES = ${LIBGTS_SRCS} gts/gts_lists.h
373 gts/gts_lists.h : ${LIBGTS_SRCS} Makefile
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
381 libbatch_a_CPPFLAGS = -I./hid/batch
385 libbatch_a_SOURCES = ${LIBBATCH_SRCS} hid/batch/batch_lists.h
387 hid/batch/batch_lists.h : ${LIBBATCH_SRCS} Makefile
390 (for f in ${LIBBATCH_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
393 libgerber_a_SOURCES = \
401 libps_a_CPPFLAGS = -I./hid/ps
408 libps_a_SOURCES = ${LIBPS_SRCS} hid/ps/ps_lists.h
410 hid/ps/ps_lists.h : ${LIBPS_SRCS} Makefile
413 (for f in ${LIBPS_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
416 libpng_a_CPPFLAGS = -I./hid/png
422 libpng_a_SOURCES = ${LIBPNG_SRCS} hid/png/png_lists.h
424 hid/png/png_lists.h : ${LIBPNG_SRCS} Makefile
427 (for f in ${LIBPNG_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
430 libgcode_a_CPPFLAGS = -I./hid/gcode
436 hid/gcode/decompose.c \
437 hid/gcode/decompose.h \
442 hid/gcode/auxiliary.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
451 (for f in ${LIBGCODE_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
454 libnelma_a_CPPFLAGS = -I./hid/nelma
460 libnelma_a_SOURCES = ${LIBNELMA_SRCS} hid/nelma/nelma_lists.h
462 hid/nelma/nelma_lists.h : ${LIBNELMA_SRCS} Makefile
465 (for f in ${LIBNELMA_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
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 \
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 > $@