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()
142 hid/common/actions.c \
144 hid/common/hidinit.c \
145 hid/common/hidnogui.c \
146 hid/common/extents.c \
147 hid/common/draw_helpers.c \
148 hid/common/draw_helpers.h \
149 hid/common/hid_resource.c \
150 hid/common/hid_resource.h \
153 EXTRA_pcb_SOURCES = ${DBUS_SRCS} toporouter.c toporouter.h
163 hid/gtk/gtk_lists.h \
164 hid/lesstif/lesstif_lists.h \
165 hid/batch/batch_lists.h \
166 hid/png/png_lists.h \
167 hid/gcode/gcode_lists.h \
168 hid/nelma/nelma_lists.h \
175 pcb_LDADD = @HIDLIBS@
176 pcb_DEPENDENCIES = @HIDLIBS@
179 PCB_SRCS += toporouter.c toporouter.h
180 noinst_LIBRARIES += libgts.a
181 pcb_LDADD += libgts.a
182 pcb_DEPENDENCIES += libgts.a
185 pcb_SOURCES = ${PCB_SRCS} core_lists.h
187 # Action, Attribute, and Flag lists.
188 core_lists.h : ${PCB_SRCS} Makefile
190 (for f in ${PCB_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
194 INCLUDES= -I$(top_srcdir) -I$(srcdir)/icons -I$(srcdir)/gts
196 DEFS= -DLOCALEDIR=\"$(localedir)\" @DEFS@
201 $(srcdir)/hid/batch/hid.conf \
202 $(srcdir)/hid/bom/hid.conf \
203 $(srcdir)/hid/gcode/hid.conf \
204 $(srcdir)/hid/gerber/hid.conf \
205 $(srcdir)/hid/gtk/gui-icons-misc.data \
206 $(srcdir)/hid/gtk/gui-icons-mode-buttons.data \
207 $(srcdir)/hid/gtk/hid.conf \
208 $(srcdir)/hid/gtk/pcb.rc \
209 $(srcdir)/hid/lesstif/hid.conf \
210 $(srcdir)/hid/lpr/hid.conf \
211 $(srcdir)/hid/png/hid.conf \
212 $(srcdir)/hid/nelma/hid.conf \
213 $(srcdir)/hid/ps/hid.conf \
221 all-local: pcbtest.sh
223 pcb-menu.h : pcb-menu.res
224 echo '/* AUTOMATICALLY GENERATED FROM pcb-menu.res DO NOT EDIT */' > $@
225 echo 'const char *pcb_menu_default[] = {' >> $@
226 sed 's/\\/\\\\/g; s/"/\\"/g; s/^/"/; s/$$/",/' < ${srcdir}/pcb-menu.res >> $@
229 gpcb-menu.h : gpcb-menu.res
230 echo '/* AUTOMATICALLY GENERATED FROM gpcb-menu.res DO NOT EDIT */' > $@
231 echo 'const char *gpcb_menu_default[] = {' >> $@
232 sed 's/\\/\\\\/g; s/"/\\"/g; s/^/"/; s/$$/",/' < ${srcdir}/gpcb-menu.res >> $@
235 hid/common/hidlist.h : Makefile
236 $(MKDIR_P) hid/common
238 for e in ${HIDLIST}; do \
239 echo "HID_DEF($${e})" >> $@; \
242 libgtk_a_CPPFLAGS = -I./hid/gtk
246 hid/gtk/gtkhid-main.c \
247 hid/gtk/gtkhid-gdk.c \
250 hid/gtk/gui-command-window.c \
251 hid/gtk/gui-config.c \
252 hid/gtk/gui-dialog-print.c \
253 hid/gtk/gui-dialog-size.c \
254 hid/gtk/gui-dialog.c \
255 hid/gtk/gui-drc-window.c \
256 hid/gtk/gui-drc-window.h \
257 hid/gtk/gui-keyref-window.c \
258 hid/gtk/gui-library-window.c \
259 hid/gtk/gui-library-window.h \
260 hid/gtk/gui-log-window.c \
262 hid/gtk/gui-netlist-window.c \
263 hid/gtk/gui-output-events.c \
264 hid/gtk/gui-pinout-preview.c \
265 hid/gtk/gui-pinout-preview.h \
266 hid/gtk/gui-pinout-window.c \
267 hid/gtk/gui-render-pixmap.c \
268 hid/gtk/gui-top-window.c \
270 libgtk_a_SOURCES = ${LIBGTK_SRCS} hid/gtk/gtk_lists.h
272 hid/gtk/gtk_lists.h : ${LIBGTK_SRCS} Makefile
275 (for f in ${LIBGTK_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
278 # If we are building with dbus support, we need some extra files
280 dbus-introspect.h : dbus.xml Makefile
281 echo '/* AUTOMATICALLY GENERATED FROM dbus.xml DO NOT EDIT */' > $@.tmp
282 echo "static char *pcb_dbus_introspect_xml =" > $@.tmp
283 sed 's/\\/\\\\/g; s/"/\\"/g; s/^/"/; s/$$/"/' < $(srcdir)/dbus.xml >> $@.tmp
287 PCB_SRCS+= ${DBUS_SRCS}
288 BUILT_SOURCES+= dbus-introspect.h
292 # If we are building on win32, then compile in some icons for the
293 # desktop and application toolbar
295 pcb_icon.o : pcb_icon.ico $(srcdir)/hid/gtk/pcb.rc
296 $(WINDRES) $(srcdir)/hid/gtk/pcb.rc $@
298 pcb_icon.ico: $(top_srcdir)/data/pcb_icon.ico
299 cp $(top_srcdir)/data/pcb_icon.ico $@
301 pcb_LDADD+= pcb_icon.o
302 pcb_DEPENDENCIES+= pcb_icon.o
307 liblesstif_a_CPPFLAGS = -I./hid/lesstif
311 hid/lesstif/dialogs.c \
312 hid/lesstif/lesstif.h \
313 hid/lesstif/library.c \
316 hid/lesstif/netlist.c \
317 hid/lesstif/styles.c \
318 hid/lesstif/xincludes.h
319 liblesstif_a_SOURCES = ${LIBLESSTIF_SRCS} hid/lesstif/lesstif_lists.h
321 hid/lesstif/lesstif_lists.h : ${LIBLESSTIF_SRCS} Makefile
322 $(MKDIR_P) hid/lesstif
324 (for f in ${LIBLESSTIF_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
327 libgts_a_CPPFLAGS = -I./gts
367 libgts_a_SOURCES = ${LIBGTS_SRCS} gts/gts_lists.h
369 gts/gts_lists.h : ${LIBGTS_SRCS} Makefile
372 # Uncomment out the following if/when we ever end up with REGISTER in any of the gts
373 # source files. For now, there aren't any and so the grep fails and make stops
374 # (for f in ${LIBGTS_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
377 libbatch_a_CPPFLAGS = -I./hid/batch
381 libbatch_a_SOURCES = ${LIBBATCH_SRCS} hid/batch/batch_lists.h
383 hid/batch/batch_lists.h : ${LIBBATCH_SRCS} Makefile
386 (for f in ${LIBBATCH_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
389 libgerber_a_SOURCES = \
397 libps_a_CPPFLAGS = -I./hid/ps
404 libps_a_SOURCES = ${LIBPS_SRCS} hid/ps/ps_lists.h
406 hid/ps/ps_lists.h : ${LIBPS_SRCS} Makefile
409 (for f in ${LIBPS_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
412 libpng_a_CPPFLAGS = -I./hid/png
418 libpng_a_SOURCES = ${LIBPNG_SRCS} hid/png/png_lists.h
420 hid/png/png_lists.h : ${LIBPNG_SRCS} Makefile
423 (for f in ${LIBPNG_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
426 libgcode_a_CPPFLAGS = -I./hid/gcode
432 hid/gcode/decompose.c \
433 hid/gcode/decompose.h \
438 hid/gcode/auxiliary.h \
441 hid/gcode/potracelib.h
442 libgcode_a_SOURCES = ${LIBGCODE_SRCS} hid/gcode/gcode_lists.h
444 hid/gcode/gcode_lists.h : ${LIBGCODE_SRCS} Makefile
447 (for f in ${LIBGCODE_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
450 libnelma_a_CPPFLAGS = -I./hid/nelma
456 libnelma_a_SOURCES = ${LIBNELMA_SRCS} hid/nelma/nelma_lists.h
458 hid/nelma/nelma_lists.h : ${LIBNELMA_SRCS} Makefile
461 (for f in ${LIBNELMA_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
468 DISTCLEANFILES= pcbtest.sh gpcb-menu.h pcb-menu.h \
469 hid/batch/batch_lists.h \
470 hid/common/hidlist.h \
471 hid/gtk/gtk_lists.h \
472 hid/lesstif/lesstif_lists.h \
473 hid/png/png_lists.h \
474 hid/gcode/gcode_lists.h \
475 hid/nelma/nelma_lists.h \
481 # create wrapper script that lets you test pcb prior to installation
482 pcbtest.sh: $(srcdir)/pcbtest.sh.in Makefile
483 sed -e 's;@BUILDDIR@;${abs_builddir};g' -e 's;@TOP_BUILDDIR@;${abs_top_builddir};g' \
484 -e 's;@TOPSRCDIR@;${abs_top_srcdir};g' \
485 $(srcdir)/pcbtest.sh.in > $@