[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-user: pcb library and hid build modification
For your consideration...
I've incorporated a libtool based library from the PCB sources, and
each HID is now created with libtool as static archives using their
own Makefiles. I hope this will make it easier to incorporate new
HID's in the future since it keeps you from editing a single
makefile. New HIDs should only require copying an existing HID
directory and modifying the Makefile which should be picked up from
the rest of the Makefile hierarchy. You will still need to add the
HID makefile to the [1]configure.ac file for automake creation though,
but that should be it.
This also separates the pcb executable from the "core" files and
creates a libpcb.so file that the main.c is linked against to create
the pcb executable.
I'm working on python bindings for both libgeda and pcb so this was
the "easiest" way I could think of to get access to the pcb functions
for export. This may have added benifit allowing for easier combining
of libgeda and libpcb in the future as well if desired.
Compiles cleanly and works on Ubuntu. Tried not to break the WIN32
code, but have no way to test.
Jason
References
1. http://configure.ac/
diff --git a/autogen.sh b/autogen.sh
index d1671fb..9a8f624 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -11,6 +11,25 @@ export CONFIG_SHELL
############################################################################
#
+# libtoolize
+#
+
+echo "Checking for libtoolize..."
+# Possible names for libtool/libtoolize
+libtoolize_candidates="libtoolize glibtoolize"
+
+LIBTOOLIZE=`which $libtoolize_candidates 2>/dev/null | head -n1`
+(! test -z "$LIBTOOLIZE") || {
+ echo
+ echo "**Error**: You must have \`libtool' installed."
+ echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
+ DIE=1
+}
+echo "Running libtoolize..."
+$LIBTOOLIZE --force --copy || exit 1
+
+############################################################################
+#
# autopoint (gettext)
#
diff --git a/configure.ac b/configure.ac
index 08fcd6e..45be377 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,6 +10,11 @@ AM_CONFIG_HEADER([config.h])
AM_MAINTAINER_MODE
+dnl Initialize libtool
+AC_LIBTOOL_WIN32_DLL
+AM_PROG_LIBTOOL
+AC_CONFIG_MACRO_DIR([m4])
+
dnl determine host type
AC_CANONICAL_HOST
AC_MSG_CHECKING(for windows)
@@ -93,7 +98,6 @@ ftp://ftp.gnu.org/pub/gnu/bison/
fi
AC_PROG_INSTALL
-AC_PROG_RANLIB
#
# Used for building the icons
@@ -349,8 +353,10 @@ for hid in $HIDLIST; do
fi
done
-for e in $HIDLIST; do
- HIDLIBS="$HIDLIBS lib$e.a"
+AC_MSG_RESULT([Processing all enabled HIDs])
+for hid in $HIDLIST; do
+ AC_MSG_RESULT([Adding $hid as _hid_$hid.la])
+ HIDLIBS="$HIDLIBS hid/$hid/_hid_$hid.la"
done
AC_SUBST(HIDLIST)
@@ -925,6 +931,18 @@ if test -d $srcdir/newlib; then
AC_CONFIG_FILES(newlib/tests/Makefile)
fi
AC_CONFIG_FILES(src/Makefile)
+AC_CONFIG_FILES(src/hid/Makefile)
+AC_CONFIG_FILES(src/hid/batch/Makefile)
+AC_CONFIG_FILES(src/hid/bom/Makefile)
+AC_CONFIG_FILES(src/hid/common/Makefile)
+AC_CONFIG_FILES(src/hid/gerber/Makefile)
+AC_CONFIG_FILES(src/hid/gtk/Makefile)
+AC_CONFIG_FILES(src/hid/lesstif/Makefile)
+AC_CONFIG_FILES(src/hid/lpr/Makefile)
+AC_CONFIG_FILES(src/hid/nelma/Makefile)
+AC_CONFIG_FILES(src/hid/png/Makefile)
+AC_CONFIG_FILES(src/hid/ps/Makefile)
+AC_CONFIG_FILES(src/gts/Makefile)
AC_CONFIG_FILES(src/icons/Makefile)
if test -d $srcdir/tools; then
AC_CONFIG_FILES(tools/Makefile)
diff --git a/src/Makefile.am b/src/Makefile.am
index ebff648..cb0dcf4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2,24 +2,18 @@
## $Id$
##
-SUBDIRS= icons
+SUBDIRS = hid gts icons
-pcbtreedir= @PCBTREEDIR@
-pcblibdir= @PCBLIBDIR@
+pcblibdir = @PCBLIBDIR@
AUTOMAKE_OPTIONS = subdir-objects
-HIDLIST = @HIDLIST@
-noinst_LIBRARIES = @HIDLIBS@
-EXTRA_LIBRARIES = \
- libgtk.a liblesstif.a libbatch.a \
- liblpr.a libgerber.a libbom.a libpng.a libps.a libnelma.a libgts.a
-
-pcblib_DATA= \
+pcblib_DATA = \
default_font \
gpcb-menu.res \
pcb-menu.res
-bin_PROGRAMS= pcb
+bin_PROGRAMS = pcb
+lib_LTLIBRARIES = libpcb.la
if DEBUG_BUILD
# don't disable assert()
@@ -27,193 +21,96 @@ else
AM_CFLAGS = -DNDEBUG
endif
-PCB_SRCS = \
+libpcb_la_SOURCES = \
action.c \
- action.h \
autoplace.c \
- autoplace.h \
autoroute.c \
- autoroute.h \
- box.h \
buffer.c \
- buffer.h \
change.c \
- change.h \
clip.c \
- clip.h \
command.c \
- command.h \
compat.c \
- compat.h \
- const.h \
copy.c \
- copy.h \
create.c \
- create.h \
crosshair.c \
- crosshair.h \
data.c \
- data.h \
djopt.c \
- djopt.h \
- dolists.h \
draw.c \
- draw.h \
drill.c \
- drill.h \
edif.y \
- edif_parse.h \
error.c \
- error.h \
file.c \
- file.h \
find.c \
- find.h \
flags.c \
fontmode.c \
- global.h \
heap.c \
- heap.h \
- hid.h \
insert.c \
- insert.h \
intersect.c \
- intersect.h \
line.c \
- line.h \
lrealpath.c \
- lrealpath.h \
- macro.h \
- main.c \
mirror.c \
- mirror.h \
misc.c \
- misc.h \
move.c \
- move.h \
mtspace.c \
- mtspace.h \
mymem.c \
- mymem.h \
netlist.c \
- parse_l.h \
parse_l.l \
- parse_y.h \
parse_y.y \
polygon.c \
- polygon.h \
polygon1.c \
- polyarea.h \
puller.c \
print.c \
- print.h \
rats.c \
- rats.h \
remove.c \
- remove.h \
report.c \
- report.h \
res_parse.y \
res_lex.l \
- resource.h \
rotate.c \
- rotate.h \
rtree.c \
- rtree.h \
rubberband.c \
- rubberband.h \
search.c \
- search.h \
select.c \
- select.h \
set.c \
- set.h \
strflags.c \
- strflags.h \
thermal.c \
- thermal.h \
undo.c \
- undo.h \
vector.c \
- vector.h \
- vendor.c \
- vendor.h \
- hid/common/actions.c \
- hid/common/flags.c \
- hid/common/hidinit.c \
- hid/common/hidnogui.c \
- hid/common/extents.c \
- hid/common/draw_helpers.c \
- hid/common/draw_helpers.h \
- hid/hidint.h
-
-EXTRA_pcb_SOURCES = ${DBUS_SRCS} toporouter.c toporouter.h
-DBUS_SRCS= \
- dbus-pcbmain.c \
- dbus-pcbmain.h \
- dbus.h \
- dbus.c
+ vendor.c
BUILT_SOURCES = \
core_lists.h \
gpcb-menu.h \
- hid/gtk/gtk_lists.h \
- hid/lesstif/lesstif_lists.h \
- hid/batch/batch_lists.h \
- hid/png/png_lists.h \
- hid/nelma/nelma_lists.h \
- hid/ps/ps_lists.h \
parse_y.h \
pcb-menu.h \
- res_parse.h \
- hid/common/hidlist.h
+ res_parse.h
-pcb_LDADD = @HIDLIBS@
-pcb_DEPENDENCIES = @HIDLIBS@
-
-if WITH_TOPOROUTER
-PCB_SRCS += toporouter.c toporouter.h
-noinst_PROGRAMS = predicates_init
-noinst_LIBRARIES += libgts.a
-pcb_LDADD += libgts.a
-pcb_DEPENDENCIES += libgts.a
-BUILT_SOURCES += gts/predicates_init.h
-endif
-
-pcb_SOURCES = ${PCB_SRCS} core_lists.h
+libpcb_la_LIBADD = hid/common/_hid_common.la @HIDLIBS@
+libpcb_la_DEPENDENCIES = hid/common/_hid_common.la @HIDLIBS@
# Action, Attribute, and Flag lists.
-core_lists.h : ${PCB_SRCS} Makefile
+core_lists.h : ${libpcb_la_SOURCES} Makefile
true > $@
- (for f in ${PCB_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
+ (for f in ${libpcb_la_SOURCES} ${pcb_SOURCES} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
mv $@.tmp $@
+pcb_SOURCES = main.c
+pcb_LDADD = libpcb.la
+pcb_DEPENDENCIES = libpcb.la
+
# for globalconst.h
-INCLUDES= -I$(top_srcdir) -I$(srcdir)/icons -I$(srcdir)/gts
+INCLUDES = -I$(top_srcdir) -I$(srcdir)/icons -I$(srcdir)/gts
-DEFS= -DLOCALEDIR=\"$(localedir)\" @DEFS@
+DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
-EXTRA_DIST= \
+EXTRA_DIST = \
check_icon.data \
default_font \
- $(srcdir)/hid/batch/hid.conf \
- $(srcdir)/hid/bom/hid.conf \
- $(srcdir)/hid/gerber/hid.conf \
- $(srcdir)/hid/gtk/gui-icons-misc.data \
- $(srcdir)/hid/gtk/gui-icons-mode-buttons.data \
- $(srcdir)/hid/gtk/hid.conf \
- $(srcdir)/hid/gtk/pcb.rc \
- $(srcdir)/hid/lesstif/hid.conf \
- $(srcdir)/hid/lpr/hid.conf \
- $(srcdir)/hid/png/hid.conf \
- $(srcdir)/hid/nelma/hid.conf \
- $(srcdir)/hid/ps/hid.conf \
gpcb-menu.res \
pcb-menu.res \
pcbtest.sh.in \
dbus.xml
-AM_YFLAGS= -d
+AM_YFLAGS = -d
all-local: pcbtest.sh
@@ -229,48 +126,14 @@ gpcb-menu.h : gpcb-menu.res
sed 's/\\/\\\\/g; s/"/\\"/g; s/^/"/; s/$$/",/' < ${srcdir}/gpcb-menu.res >> $@
echo '0};' >> $@
-hid/common/hidlist.h : Makefile
- true > $@
- for e in ${HIDLIST}; do \
- echo "HID_DEF($${e})" >> $@; \
- done
-
-libgtk_a_CPPFLAGS = -I./hid/gtk
-LIBGTK_SRCS = \
- dolists.h \
- hid/hidint.h \
- hid/gtk/gtkhid-main.c \
- hid/gtk/gtkhid.h \
- hid/gtk/gui.h \
- hid/gtk/gui-command-window.c \
- hid/gtk/gui-config.c \
- hid/gtk/gui-dialog-print.c \
- hid/gtk/gui-dialog-size.c \
- hid/gtk/gui-dialog.c \
- hid/gtk/gui-drc-window.c \
- hid/gtk/gui-drc-window.h \
- hid/gtk/gui-keyref-window.c \
- hid/gtk/gui-library-window.c \
- hid/gtk/gui-library-window.h \
- hid/gtk/gui-log-window.c \
- hid/gtk/gui-misc.c \
- hid/gtk/gui-netlist-window.c \
- hid/gtk/gui-output-events.c \
- hid/gtk/gui-pinout-preview.c \
- hid/gtk/gui-pinout-preview.h \
- hid/gtk/gui-pinout-window.c \
- hid/gtk/gui-render-pixmap.c \
- hid/gtk/gui-top-window.c \
- hid/gtk/gui-utils.c
-libgtk_a_SOURCES = ${LIBGTK_SRCS} hid/gtk/gtk_lists.h
-
-hid/gtk/gtk_lists.h : ${LIBGTK_SRCS} Makefile
- true > $@
- (for f in ${LIBGTK_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
- mv $@.tmp $@
-
# If we are building with dbus support, we need some extra files
if WITH_DBUS
+DBUS_SRCS= \
+ dbus-pcbmain.c \
+ dbus-pcbmain.h \
+ dbus.h \
+ dbus.c
+
dbus-introspect.h : dbus.xml Makefile
echo '/* AUTOMATICALLY GENERATED FROM dbus.xml DO NOT EDIT */' > $@.tmp
echo "static char *pcb_dbus_introspect_xml =" > $@.tmp
@@ -278,10 +141,10 @@ dbus-introspect.h : dbus.xml Makefile
echo ";" >> $@.tmp
mv $@.tmp $@
-PCB_SRCS+= ${DBUS_SRCS}
-BUILT_SOURCES+= dbus-introspect.h
+libpcb_la_SOURCES += ${DBUS_SRCS}
+BUILT_SOURCES += dbus-introspect.h
-endif
+endif # WITH_DBUS
# If we are building on win32, then compile in some icons for the
# desktop and application toolbar
@@ -292,156 +155,17 @@ pcb_icon.o : pcb_icon.ico $(srcdir)/hid/gtk/pcb.rc
pcb_icon.ico: $(top_srcdir)/data/pcb_icon.ico
cp $(top_srcdir)/data/pcb_icon.ico $@
-pcb_LDADD+= pcb_icon.o
-pcb_DEPENDENCIES+= pcb_icon.o
-
-endif
-
+libpcb_la_LIBADD += pcb_icon.o
-liblesstif_a_CPPFLAGS = -I./hid/lesstif
-LIBLESSTIF_SRCS = \
- dolists.h \
- hid/hidint.h \
- hid/lesstif/dialogs.c \
- hid/lesstif/lesstif.h \
- hid/lesstif/library.c \
- hid/lesstif/main.c \
- hid/lesstif/menu.c \
- hid/lesstif/netlist.c \
- hid/lesstif/styles.c \
- hid/lesstif/xincludes.h
-liblesstif_a_SOURCES = ${LIBLESSTIF_SRCS} hid/lesstif/lesstif_lists.h
+endif # WIN32
-hid/lesstif/lesstif_lists.h : ${LIBLESSTIF_SRCS} Makefile
- true > $@
- (for f in ${LIBLESSTIF_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
- mv $@.tmp $@
-
-predicates_init_SOURCES = gts/predicates_init.c gts/rounding.h
-
-gts/predicates_init.h: predicates_init
- ./predicates_init > gts/predicates_init.h
-
-libgts_a_CPPFLAGS = -I./gts
-LIBGTS_SRCS = \
- gts/object.c \
- gts/point.c \
- gts/vertex.c \
- gts/segment.c \
- gts/edge.c \
- gts/triangle.c \
- gts/face.c \
- gts/kdtree.c \
- gts/bbtree.c \
- gts/misc.c \
- gts/gts-private.h \
- gts/predicates.c \
- gts/predicates.h \
- gts/rounding.h \
- gts/heap.c \
- gts/eheap.c \
- gts/fifo.c \
- gts/gts.h \
- gts/matrix.c \
- gts/surface.c \
- gts/stripe.c \
- gts/vopt.c \
- gts/refine.c \
- gts/iso.c \
- gts/isotetra.c \
- gts/split.c \
- gts/psurface.c \
- gts/hsurface.c \
- gts/cdt.c \
- gts/boolean.c \
- gts/named.c \
- gts/oocs.c \
- gts/container.c \
- gts/graph.c \
- gts/pgraph.c \
- gts/partition.c \
- gts/curvature.c \
- gts/tribox3.c
-libgts_a_SOURCES = ${LIBGTS_SRCS} gts/gts_lists.h
-libgts_a_DEPENDENCIES = gts/predicates_init.h
-
-gts/gts_lists.h : ${LIBGTS_SRCS} Makefile
- true > $@
- (for f in ${LIBGTS_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
- mv $@.tmp $@
-
-libbatch_a_CPPFLAGS = -I./hid/batch
-LIBBATCH_SRCS = \
- hid/hidint.h \
- hid/batch/batch.c
-libbatch_a_SOURCES = ${LIBBATCH_SRCS} hid/batch/batch_lists.h
-
-hid/batch/batch_lists.h : ${LIBBATCH_SRCS} Makefile
- true > $@
- (for f in ${LIBBATCH_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
- mv $@.tmp $@
-
-libgerber_a_SOURCES = \
- hid/hidint.h \
- hid/gerber/gerber.c
-
-libbom_a_SOURCES = \
- hid/hidint.h \
- hid/bom/bom.c
-
-libps_a_CPPFLAGS = -I./hid/ps
-LIBPS_SRCS = \
- dolists.h \
- hid/hidint.h \
- hid/ps/ps.c \
- hid/ps/ps.h \
- hid/ps/eps.c
-libps_a_SOURCES = ${LIBPS_SRCS} hid/ps/ps_lists.h
-
-hid/ps/ps_lists.h : ${LIBPS_SRCS} Makefile
- true > $@
- (for f in ${LIBPS_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
- mv $@.tmp $@
-
-libpng_a_CPPFLAGS = -I./hid/png
-LIBPNG_SRCS = \
- dolists.h \
- hid/hidint.h \
- hid/png/png.c \
- hid/png/png.h
-libpng_a_SOURCES = ${LIBPNG_SRCS} hid/png/png_lists.h
-
-hid/png/png_lists.h : ${LIBPNG_SRCS} Makefile
- true > $@
- (for f in ${LIBPNG_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
- mv $@.tmp $@
-
-libnelma_a_CPPFLAGS = -I./hid/nelma
-LIBNELMA_SRCS = \
- dolists.h \
- hid/hidint.h \
- hid/nelma/nelma.c \
- hid/nelma/nelma.h
-libnelma_a_SOURCES = ${LIBNELMA_SRCS} hid/nelma/nelma_lists.h
-
-hid/nelma/nelma_lists.h : ${LIBNELMA_SRCS} Makefile
- true > $@
- (for f in ${LIBNELMA_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
- mv $@.tmp $@
-
-liblpr_a_SOURCES = \
- hid/hidint.h \
- hid/lpr/lpr.c
+if WITH_TOPOROUTER
+libpcb_la_SOURCES += toporouter.c
+libpcb_la_DEPENDENCIES += gts/libgts.la
+libpcb_la_LIBADD += gts/libgts.la
+endif # WITH_TOPOROUTER
DISTCLEANFILES= pcbtest.sh gpcb-menu.h pcb-menu.h \
- hid/batch/batch_lists.h \
- hid/common/hidlist.h \
- hid/gtk/gtk_lists.h \
- hid/lesstif/lesstif_lists.h \
- hid/png/png_lists.h \
- hid/nelma/nelma_lists.h \
- hid/ps/ps_lists.h \
- gts/gts_lists.h \
core_lists.h \
dbus-introspect.h
diff --git a/src/gts/Makefile.am b/src/gts/Makefile.am
new file mode 100644
index 0000000..c678ca9
--- /dev/null
+++ b/src/gts/Makefile.am
@@ -0,0 +1,80 @@
+## -*- makefile -*-
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = subdir-objects
+
+if DEBUG_BUILD
+# don't disable assert()
+else
+AM_CFLAGS = -DNDEBUG
+endif
+
+# for globalconst.h
+INCLUDES = \
+ -I$(srcdir) \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/src/hid \
+ -I$(top_srcdir)/src/icons \
+ -I$(top_srcdir)/src/gts
+
+DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
+
+AM_YFLAGS = -d
+
+BUILT_SOURCES = predicates_init.h
+predicates_init_SOURCES = predicates_init.c
+
+predicates_init.h: predicates_init
+ ./predicates_init > predicates_init.h
+
+if WITH_TOPOROUTER
+noinst_PROGRAMS = predicates_init
+noinst_LTLIBRARIES = libgts.la
+
+libgts_la_CFLAGS = $(INCLUDES)
+libgts_la_SOURCES = \
+ object.c \
+ point.c \
+ vertex.c \
+ segment.c \
+ edge.c \
+ triangle.c \
+ face.c \
+ kdtree.c \
+ bbtree.c \
+ misc.c \
+ predicates.c \
+ rounding.h \
+ heap.c \
+ eheap.c \
+ fifo.c \
+ matrix.c \
+ surface.c \
+ stripe.c \
+ vopt.c \
+ refine.c \
+ iso.c \
+ isotetra.c \
+ split.c \
+ psurface.c \
+ hsurface.c \
+ cdt.c \
+ boolean.c \
+ named.c \
+ oocs.c \
+ container.c \
+ graph.c \
+ pgraph.c \
+ partition.c \
+ curvature.c \
+ tribox3.c
+
+libgts_la_DEPENDENCIES = predicates_init.h
+
+endif # WITH_TOPOROUTER
+
+DISTCLEANFILES = \
+ predicates_init \
+ predicates_init.h
diff --git a/src/hid/Makefile.am b/src/hid/Makefile.am
new file mode 100644
index 0000000..131578f
--- /dev/null
+++ b/src/hid/Makefile.am
@@ -0,0 +1,5 @@
+## -*- makefile -*-
+## $Id$
+##
+
+SUBDIRS = common @HIDLIST@
diff --git a/src/hid/batch/Makefile.am b/src/hid/batch/Makefile.am
new file mode 100644
index 0000000..b96384b
--- /dev/null
+++ b/src/hid/batch/Makefile.am
@@ -0,0 +1,39 @@
+## -*- makefile -*-
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = subdir-objects
+
+if DEBUG_BUILD
+# don't disable assert()
+else
+AM_CFLAGS = -DNDEBUG
+endif
+
+# for globalconst.h
+INCLUDES = \
+ -I$(srcdir) \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/src/hid \
+ -I$(top_srcdir)/src/icons \
+ -I$(top_srcdir)/src/gts
+
+DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
+
+EXTRA_DIST = hid.conf
+
+AM_YFLAGS = -d
+
+noinst_LTLIBRARIES = _hid_batch.la
+_hid_batch_la_CFLAGS = $(INCLUDES)
+_hid_batch_la_LDFLAGS = -module
+_hid_batch_la_SOURCES = batch.c
+BUILT_SOURCES = batch_lists.h
+
+batch_lists.h : ${_hid_batch_la_SOURCES} Makefile
+ true > $@
+ (for f in ${_hid_batch_la_SOURCES} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
+ mv $@.tmp $@
+
+DISTCLEANFILES = batch_lists.h
diff --git a/src/hid/bom/Makefile.am b/src/hid/bom/Makefile.am
new file mode 100644
index 0000000..8dcf25e
--- /dev/null
+++ b/src/hid/bom/Makefile.am
@@ -0,0 +1,31 @@
+## -*- makefile -*-
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = subdir-objects
+
+if DEBUG_BUILD
+# don't disable assert()
+else
+AM_CFLAGS = -DNDEBUG
+endif
+
+# for globalconst.h
+INCLUDES = \
+ -I$(srcdir) \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/src/hid \
+ -I$(top_srcdir)/src/icons \
+ -I$(top_srcdir)/src/gts
+
+DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
+
+EXTRA_DIST = hid.conf
+
+AM_YFLAGS = -d
+
+noinst_LTLIBRARIES = _hid_bom.la
+_hid_bom_la_CFLAGS = $(INCLUDES)
+_hid_bom_la_LDFLAGS = -module
+_hid_bom_la_SOURCES = bom.c
diff --git a/src/hid/common/Makefile.am b/src/hid/common/Makefile.am
new file mode 100644
index 0000000..85e8e0a
--- /dev/null
+++ b/src/hid/common/Makefile.am
@@ -0,0 +1,46 @@
+## -*- makefile -*-
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = subdir-objects
+HIDLIST = @HIDLIST@
+
+if DEBUG_BUILD
+# don't disable assert()
+else
+AM_CFLAGS = -DNDEBUG
+endif
+
+# for globalconst.h
+INCLUDES = \
+ -I$(srcdir) \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/src/hid \
+ -I$(top_srcdir)/src/icons \
+ -I$(top_srcdir)/src/gts
+
+DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
+
+AM_YFLAGS = -d
+
+noinst_LTLIBRARIES = _hid_common.la
+_hid_common_la_CFLAGS = $(INCLUDES)
+_hid_common_la_LDFLAGS = -module
+_hid_common_la_SOURCES = \
+ actions.c \
+ draw_helpers.c \
+ extents.c \
+ flags.c \
+ hidinit.c \
+ hidnogui.c
+
+BUILT_SOURCES = hidlist.h
+
+hidlist.h : Makefile
+ true > $@
+ for e in ${HIDLIST}; do \
+ echo "HID_DEF($${e})" >> $@; \
+ done
+
+DISTCLEANFILES = hidlist.h
diff --git a/src/hid/gerber/Makefile.am b/src/hid/gerber/Makefile.am
new file mode 100644
index 0000000..e063bee
--- /dev/null
+++ b/src/hid/gerber/Makefile.am
@@ -0,0 +1,31 @@
+## -*- makefile -*-
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = subdir-objects
+
+if DEBUG_BUILD
+# don't disable assert()
+else
+AM_CFLAGS = -DNDEBUG
+endif
+
+# for globalconst.h
+INCLUDES = \
+ -I$(srcdir) \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/src/hid \
+ -I$(top_srcdir)/src/icons \
+ -I$(top_srcdir)/src/gts
+
+DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
+
+EXTRA_DIST = hid.conf
+
+AM_YFLAGS = -d
+
+noinst_LTLIBRARIES = _hid_gerber.la
+_hid_gerber_la_CFLAGS = $(INCLUDES)
+_hid_gerber_la_LDFLAGS = -module
+_hid_gerber_la_SOURCES = gerber.c
diff --git a/src/hid/gtk/Makefile.am b/src/hid/gtk/Makefile.am
new file mode 100644
index 0000000..8a64ad8
--- /dev/null
+++ b/src/hid/gtk/Makefile.am
@@ -0,0 +1,62 @@
+## -*- makefile -*-
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = subdir-objects
+
+if DEBUG_BUILD
+# don't disable assert()
+else
+AM_CFLAGS = -DNDEBUG
+endif
+
+# for globalconst.h
+INCLUDES = \
+ -I$(srcdir) \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/src/hid \
+ -I$(top_srcdir)/src/icons \
+ -I$(top_srcdir)/src/gts
+
+DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
+
+EXTRA_DIST = \
+ hid.conf \
+ gui-icons-misc.data \
+ gui-icons-mode-buttons.data \
+ pcb.rc
+
+AM_YFLAGS = -d
+
+noinst_LTLIBRARIES = _hid_gtk.la
+_hid_gtk_la_CFLAGS = $(INCLUDES)
+_hid_gtk_la_LDFLAGS = -module
+_hid_gtk_la_SOURCES = \
+ gtkhid-main.c \
+ gui-command-window.c \
+ gui-config.c \
+ gui-dialog-print.c \
+ gui-dialog-size.c \
+ gui-dialog.c \
+ gui-drc-window.c \
+ gui-keyref-window.c \
+ gui-library-window.c \
+ gui-log-window.c \
+ gui-misc.c \
+ gui-netlist-window.c \
+ gui-output-events.c \
+ gui-pinout-preview.c \
+ gui-pinout-window.c \
+ gui-render-pixmap.c \
+ gui-top-window.c \
+ gui-utils.c
+
+BUILT_SOURCES = gtk_lists.h
+
+gtk_lists.h : ${_hid_gtk_la_SOURCES} Makefile
+ true > $@
+ (for f in ${_hid_gtk_la_SOURCES} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
+ mv $@.tmp $@
+
+DISTCLEANFILES = gtk_lists.h
diff --git a/src/hid/lesstif/Makefile.am b/src/hid/lesstif/Makefile.am
new file mode 100644
index 0000000..c27c6b6
--- /dev/null
+++ b/src/hid/lesstif/Makefile.am
@@ -0,0 +1,47 @@
+## -*- makefile -*-
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = subdir-objects
+
+if DEBUG_BUILD
+# don't disable assert()
+else
+AM_CFLAGS = -DNDEBUG
+endif
+
+# for globalconst.h
+INCLUDES = \
+ -I$(srcdir) \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/src/hid \
+ -I$(top_srcdir)/src/icons \
+ -I$(top_srcdir)/src/gts
+
+DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
+
+EXTRA_DIST = hid.conf
+
+AM_YFLAGS = -d
+
+noinst_LTLIBRARIES = _hid_lesstif.la
+_hid_lesstif_la_CFLAGS = $(INCLUDES)
+_hid_lesstif_la_LDFLAGS = -module
+_hid_lesstif_la_SOURCES = \
+ dialogs.c \
+ library.c \
+ main.c \
+ menu.c \
+ netlist.c \
+ styles.c
+
+
+BUILT_SOURCES = lesstif_lists.h
+
+lesstif_lists.h : ${_hid_lesstif_la_SOURCES} Makefile
+ true > $@
+ (for f in ${_hid_lesstif_la_SOURCES} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
+ mv $@.tmp $@
+
+DISTCLEANFILES = lesstif_lists.h
diff --git a/src/hid/lpr/Makefile.am b/src/hid/lpr/Makefile.am
new file mode 100644
index 0000000..1bd015e
--- /dev/null
+++ b/src/hid/lpr/Makefile.am
@@ -0,0 +1,31 @@
+## -*- makefile -*-
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = subdir-objects
+
+if DEBUG_BUILD
+# don't disable assert()
+else
+AM_CFLAGS = -DNDEBUG
+endif
+
+# for globalconst.h
+INCLUDES = \
+ -I$(srcdir) \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/src/hid \
+ -I$(top_srcdir)/src/icons \
+ -I$(top_srcdir)/src/gts
+
+DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
+
+EXTRA_DIST = hid.conf
+
+AM_YFLAGS = -d
+
+noinst_LTLIBRARIES = _hid_lpr.la
+_hid_lpr_la_CFLAGS = $(INCLUDES)
+_hid_lpr_la_LDFLAGS = -module
+_hid_lpr_la_SOURCES = lpr.c
diff --git a/src/hid/nelma/Makefile.am b/src/hid/nelma/Makefile.am
new file mode 100644
index 0000000..4168785
--- /dev/null
+++ b/src/hid/nelma/Makefile.am
@@ -0,0 +1,41 @@
+## -*- makefile -*-
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = subdir-objects
+
+if DEBUG_BUILD
+# don't disable assert()
+else
+AM_CFLAGS = -DNDEBUG
+endif
+
+# for globalconst.h
+INCLUDES = \
+ -I$(srcdir) \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/src/hid \
+ -I$(top_srcdir)/src/icons \
+ -I$(top_srcdir)/src/gts
+
+DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
+
+EXTRA_DIST = hid.conf
+
+AM_YFLAGS = -d
+
+noinst_LTLIBRARIES = _hid_nelma.la
+_hid_nelma_la_CFLAGS = $(INCLUDES)
+_hid_nelma_la_LDFLAGS = -module
+_hid_nelma_la_SOURCES = nelma.c
+
+
+BUILT_SOURCES = nelma_lists.h
+
+nelma_lists.h : ${_hid_nelma_la_SOURCES} Makefile
+ true > $@
+ (for f in ${_hid_nelma_la_SOURCES} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
+ mv $@.tmp $@
+
+DISTCLEANFILES = nelma_lists.h
diff --git a/src/hid/png/Makefile.am b/src/hid/png/Makefile.am
new file mode 100644
index 0000000..7b0d2cc
--- /dev/null
+++ b/src/hid/png/Makefile.am
@@ -0,0 +1,41 @@
+## -*- makefile -*-
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = subdir-objects
+
+if DEBUG_BUILD
+# don't disable assert()
+else
+AM_CFLAGS = -DNDEBUG
+endif
+
+# for globalconst.h
+INCLUDES = \
+ -I$(srcdir) \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/src/hid \
+ -I$(top_srcdir)/src/icons \
+ -I$(top_srcdir)/src/gts
+
+DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
+
+EXTRA_DIST = hid.conf
+
+AM_YFLAGS = -d
+
+noinst_LTLIBRARIES = _hid_png.la
+_hid_png_la_CFLAGS = $(INCLUDES)
+_hid_png_la_LDFLAGS = -module
+_hid_png_la_SOURCES = png.c
+
+
+BUILT_SOURCES = png_lists.h
+
+png_lists.h : ${_hid_png_la_SOURCES} Makefile
+ true > $@
+ (for f in ${_hid_png_la_SOURCES} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
+ mv $@.tmp $@
+
+DISTCLEANFILES = png_lists.h
diff --git a/src/hid/ps/Makefile.am b/src/hid/ps/Makefile.am
new file mode 100644
index 0000000..10e8e11
--- /dev/null
+++ b/src/hid/ps/Makefile.am
@@ -0,0 +1,42 @@
+## -*- makefile -*-
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = subdir-objects
+
+if DEBUG_BUILD
+# don't disable assert()
+else
+AM_CFLAGS = -DNDEBUG
+endif
+
+# for globalconst.h
+INCLUDES = \
+ -I$(srcdir) \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/src/hid \
+ -I$(top_srcdir)/src/icons \
+ -I$(top_srcdir)/src/gts
+
+DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
+
+EXTRA_DIST = hid.conf
+
+AM_YFLAGS = -d
+
+noinst_LTLIBRARIES = _hid_ps.la
+_hid_ps_la_CFLAGS = $(INCLUDES)
+_hid_ps_la_LDFLAGS = -module
+_hid_ps_la_SOURCES = \
+ ps.c \
+ eps.c
+
+BUILT_SOURCES = ps_lists.h
+
+ps_lists.h : ${_hid_ps_la_SOURCES} Makefile
+ true > $@
+ (for f in ${_hid_ps_la_SOURCES} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
+ mv $@.tmp $@
+
+DISTCLEANFILES = ps_lists.h
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user