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 \
245 hid/gtk/gui-command-window.c \
246 hid/gtk/gui-config.c \
247 hid/gtk/gui-dialog-print.c \
248 hid/gtk/gui-dialog-size.c \
249 hid/gtk/gui-dialog.c \
250 hid/gtk/gui-drc-window.c \
251 hid/gtk/gui-drc-window.h \
252 hid/gtk/gui-keyref-window.c \
253 hid/gtk/gui-library-window.c \
254 hid/gtk/gui-library-window.h \
255 hid/gtk/gui-log-window.c \
257 hid/gtk/gui-netlist-window.c \
258 hid/gtk/gui-output-events.c \
259 hid/gtk/gui-pinout-preview.c \
260 hid/gtk/gui-pinout-preview.h \
261 hid/gtk/gui-pinout-window.c \
262 hid/gtk/gui-render-pixmap.c \
263 hid/gtk/gui-top-window.c \
265 libgtk_a_SOURCES = ${LIBGTK_SRCS} hid/gtk/gtk_lists.h
267 hid/gtk/gtk_lists.h : ${LIBGTK_SRCS} Makefile
269 (for f in ${LIBGTK_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
272 # If we are building with dbus support, we need some extra files
274 dbus-introspect.h : dbus.xml Makefile
275 echo '/* AUTOMATICALLY GENERATED FROM dbus.xml DO NOT EDIT */' > $@.tmp
276 echo "static char *pcb_dbus_introspect_xml =" > $@.tmp
277 sed 's/\\/\\\\/g; s/"/\\"/g; s/^/"/; s/$$/"/' < $(srcdir)/dbus.xml >> $@.tmp
281 PCB_SRCS+= ${DBUS_SRCS}
282 BUILT_SOURCES+= dbus-introspect.h
286 # If we are building on win32, then compile in some icons for the
287 # desktop and application toolbar
289 pcb_icon.o : pcb_icon.ico $(srcdir)/hid/gtk/pcb.rc
290 $(WINDRES) $(srcdir)/hid/gtk/pcb.rc $@
292 pcb_icon.ico: $(top_srcdir)/data/pcb_icon.ico
293 cp $(top_srcdir)/data/pcb_icon.ico $@
295 pcb_LDADD+= pcb_icon.o
296 pcb_DEPENDENCIES+= pcb_icon.o
301 liblesstif_a_CPPFLAGS = -I./hid/lesstif
305 hid/lesstif/dialogs.c \
306 hid/lesstif/lesstif.h \
307 hid/lesstif/library.c \
310 hid/lesstif/netlist.c \
311 hid/lesstif/styles.c \
312 hid/lesstif/xincludes.h
313 liblesstif_a_SOURCES = ${LIBLESSTIF_SRCS} hid/lesstif/lesstif_lists.h
315 hid/lesstif/lesstif_lists.h : ${LIBLESSTIF_SRCS} Makefile
317 (for f in ${LIBLESSTIF_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
320 libgts_a_CPPFLAGS = -I./gts
360 libgts_a_SOURCES = ${LIBGTS_SRCS} gts/gts_lists.h
362 gts/gts_lists.h : ${LIBGTS_SRCS} Makefile
364 # Uncomment out the following if/when we ever end up with REGISTER in any of the gts
365 # source files. For now, there aren't any and so the grep fails and make stops
366 # (for f in ${LIBGTS_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
369 libbatch_a_CPPFLAGS = -I./hid/batch
373 libbatch_a_SOURCES = ${LIBBATCH_SRCS} hid/batch/batch_lists.h
375 hid/batch/batch_lists.h : ${LIBBATCH_SRCS} Makefile
377 (for f in ${LIBBATCH_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
380 libgerber_a_SOURCES = \
388 libps_a_CPPFLAGS = -I./hid/ps
395 libps_a_SOURCES = ${LIBPS_SRCS} hid/ps/ps_lists.h
397 hid/ps/ps_lists.h : ${LIBPS_SRCS} Makefile
399 (for f in ${LIBPS_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
402 libpng_a_CPPFLAGS = -I./hid/png
408 libpng_a_SOURCES = ${LIBPNG_SRCS} hid/png/png_lists.h
410 hid/png/png_lists.h : ${LIBPNG_SRCS} Makefile
412 (for f in ${LIBPNG_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
415 libnelma_a_CPPFLAGS = -I./hid/nelma
421 libnelma_a_SOURCES = ${LIBNELMA_SRCS} hid/nelma/nelma_lists.h
423 hid/nelma/nelma_lists.h : ${LIBNELMA_SRCS} Makefile
425 (for f in ${LIBNELMA_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
432 DISTCLEANFILES= pcbtest.sh gpcb-menu.h pcb-menu.h \
433 hid/batch/batch_lists.h \
434 hid/common/hidlist.h \
435 hid/gtk/gtk_lists.h \
436 hid/lesstif/lesstif_lists.h \
437 hid/png/png_lists.h \
438 hid/nelma/nelma_lists.h \
444 # create wrapper script that lets you test pcb prior to installation
445 pcbtest.sh: $(srcdir)/pcbtest.sh.in Makefile
446 sed -e 's;@BUILDDIR@;${abs_builddir};g' -e 's;@TOP_BUILDDIR@;${abs_top_builddir};g' \
447 -e 's;@TOPSRCDIR@;${abs_top_srcdir};g' \
448 $(srcdir)/pcbtest.sh.in > $@