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
25 # don't disable assert()
141 hid/common/actions.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 \
152 EXTRA_pcb_SOURCES = ${DBUS_SRCS} toporouter.c toporouter.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 \
173 pcb_LDADD = @HIDLIBS@
174 pcb_DEPENDENCIES = @HIDLIBS@
177 PCB_SRCS += toporouter.c toporouter.h
178 noinst_LIBRARIES += libgts.a
179 pcb_LDADD += libgts.a
180 pcb_DEPENDENCIES += libgts.a
183 pcb_SOURCES = ${PCB_SRCS} core_lists.h
185 # Action, Attribute, and Flag lists.
186 core_lists.h : ${PCB_SRCS} Makefile
188 (for f in ${PCB_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
192 INCLUDES= -I$(top_srcdir) -I$(srcdir)/icons -I$(srcdir)/gts
194 DEFS= -DLOCALEDIR=\"$(localedir)\" @DEFS@
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 \
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 >> $@
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 >> $@
232 hid/common/hidlist.h : Makefile
234 for e in ${HIDLIST}; do \
235 echo "HID_DEF($${e})" >> $@; \
238 libgtk_a_CPPFLAGS = -I./hid/gtk
242 hid/gtk/gtkhid-main.c \
243 hid/gtk/gtkhid-gdk.c \
246 hid/gtk/gui-command-window.c \
247 hid/gtk/gui-config.c \
248 hid/gtk/gui-dialog-print.c \
249 hid/gtk/gui-dialog-size.c \
250 hid/gtk/gui-dialog.c \
251 hid/gtk/gui-drc-window.c \
252 hid/gtk/gui-drc-window.h \
253 hid/gtk/gui-keyref-window.c \
254 hid/gtk/gui-library-window.c \
255 hid/gtk/gui-library-window.h \
256 hid/gtk/gui-log-window.c \
258 hid/gtk/gui-netlist-window.c \
259 hid/gtk/gui-output-events.c \
260 hid/gtk/gui-pinout-preview.c \
261 hid/gtk/gui-pinout-preview.h \
262 hid/gtk/gui-pinout-window.c \
263 hid/gtk/gui-render-pixmap.c \
264 hid/gtk/gui-top-window.c \
266 libgtk_a_SOURCES = ${LIBGTK_SRCS} hid/gtk/gtk_lists.h
268 hid/gtk/gtk_lists.h : ${LIBGTK_SRCS} Makefile
270 (for f in ${LIBGTK_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
273 # If we are building with dbus support, we need some extra files
275 dbus-introspect.h : dbus.xml Makefile
276 echo '/* AUTOMATICALLY GENERATED FROM dbus.xml DO NOT EDIT */' > $@.tmp
277 echo "static char *pcb_dbus_introspect_xml =" > $@.tmp
278 sed 's/\\/\\\\/g; s/"/\\"/g; s/^/"/; s/$$/"/' < $(srcdir)/dbus.xml >> $@.tmp
282 PCB_SRCS+= ${DBUS_SRCS}
283 BUILT_SOURCES+= dbus-introspect.h
287 # If we are building on win32, then compile in some icons for the
288 # desktop and application toolbar
290 pcb_icon.o : pcb_icon.ico $(srcdir)/hid/gtk/pcb.rc
291 $(WINDRES) $(srcdir)/hid/gtk/pcb.rc $@
293 pcb_icon.ico: $(top_srcdir)/data/pcb_icon.ico
294 cp $(top_srcdir)/data/pcb_icon.ico $@
296 pcb_LDADD+= pcb_icon.o
297 pcb_DEPENDENCIES+= pcb_icon.o
302 liblesstif_a_CPPFLAGS = -I./hid/lesstif
306 hid/lesstif/dialogs.c \
307 hid/lesstif/lesstif.h \
308 hid/lesstif/library.c \
311 hid/lesstif/netlist.c \
312 hid/lesstif/styles.c \
313 hid/lesstif/xincludes.h
314 liblesstif_a_SOURCES = ${LIBLESSTIF_SRCS} hid/lesstif/lesstif_lists.h
316 hid/lesstif/lesstif_lists.h : ${LIBLESSTIF_SRCS} Makefile
318 (for f in ${LIBLESSTIF_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
321 libgts_a_CPPFLAGS = -I./gts
361 libgts_a_SOURCES = ${LIBGTS_SRCS} gts/gts_lists.h
363 gts/gts_lists.h : ${LIBGTS_SRCS} Makefile
365 # Uncomment out the following if/when we ever end up with REGISTER in any of the gts
366 # source files. For now, there aren't any and so the grep fails and make stops
367 # (for f in ${LIBGTS_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
370 libbatch_a_CPPFLAGS = -I./hid/batch
374 libbatch_a_SOURCES = ${LIBBATCH_SRCS} hid/batch/batch_lists.h
376 hid/batch/batch_lists.h : ${LIBBATCH_SRCS} Makefile
378 (for f in ${LIBBATCH_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
381 libgerber_a_SOURCES = \
389 libps_a_CPPFLAGS = -I./hid/ps
396 libps_a_SOURCES = ${LIBPS_SRCS} hid/ps/ps_lists.h
398 hid/ps/ps_lists.h : ${LIBPS_SRCS} Makefile
400 (for f in ${LIBPS_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
403 libpng_a_CPPFLAGS = -I./hid/png
409 libpng_a_SOURCES = ${LIBPNG_SRCS} hid/png/png_lists.h
411 hid/png/png_lists.h : ${LIBPNG_SRCS} Makefile
413 (for f in ${LIBPNG_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
416 libnelma_a_CPPFLAGS = -I./hid/nelma
422 libnelma_a_SOURCES = ${LIBNELMA_SRCS} hid/nelma/nelma_lists.h
424 hid/nelma/nelma_lists.h : ${LIBNELMA_SRCS} Makefile
426 (for f in ${LIBNELMA_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
433 DISTCLEANFILES= pcbtest.sh gpcb-menu.h pcb-menu.h \
434 hid/batch/batch_lists.h \
435 hid/common/hidlist.h \
436 hid/gtk/gtk_lists.h \
437 hid/lesstif/lesstif_lists.h \
438 hid/png/png_lists.h \
439 hid/nelma/nelma_lists.h \
445 # create wrapper script that lets you test pcb prior to installation
446 pcbtest.sh: $(srcdir)/pcbtest.sh.in Makefile
447 sed -e 's;@BUILDDIR@;${abs_builddir};g' -e 's;@TOP_BUILDDIR@;${abs_top_builddir};g' \
448 -e 's;@TOPSRCDIR@;${abs_top_srcdir};g' \
449 $(srcdir)/pcbtest.sh.in > $@