From d768b25ab7458c1a26991b0451e90e43101ca2bc Mon Sep 17 00:00:00 2001 From: rlar Date: Tue, 16 Nov 2010 19:38:18 +0000 Subject: [PATCH] fix another missing dependencies problem --- ChangeLog | 6 ++++++ configure.ac | 1 + src/Makefile.am | 35 ++++++++++++++++++----------------- 3 files changed, 25 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 43d5d90d7..3fefe63a9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-11-16 Robert Larice + * src/Makefile.am : + fix another missing dependencies problem + handcraftet compilation rules caused this problem with main.c/spice.o + a `make distclean' might be appropriate after this CVS checkout + 2010-11-16 Robert Larice * configure.ac , * src/Makefile.am , diff --git a/configure.ac b/configure.ac index 9e0393537..e8d9ba67a 100644 --- a/configure.ac +++ b/configure.ac @@ -457,6 +457,7 @@ AC_SUBST(TCL_LIB_SPEC) dnl Checks for programs AC_LIBTOOL_WIN32_DLL AC_LIBTOOL_DLOPEN +AM_PROG_CC_C_O ## AM_PROG_LIBTOOL AC_PROG_LIBTOOL diff --git a/src/Makefile.am b/src/Makefile.am index 74ba7a31b..a3abdd1f4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -27,7 +27,7 @@ endif !TCL_MODULE EXTRA_DIST = ngspice.txt setplot spectrum \ devload devaxis ciderinit winmain.c unsupported \ - tclspice.c tclspice.map pkgIndex.tcl.in tclspinit.in + tclspice.c tclspice.map pkgIndex.tcl.in tclspinit.in main.c initdatadir = $(pkgdatadir)/scripts @@ -95,16 +95,18 @@ DYNAMIC_DEVICELIBS = \ ## Build ngspice first: ngspice_SOURCES = \ + main.c \ conf.c \ conf.h \ ngspice.c +ngspice_CPPFLAGS = $(AM_CPPFLAGS) -DSIMULATOR + if WINDOWS ngspice_SOURCES += winmain.c endif ngspice_LDADD = \ - spice.lo \ frontend/libfte.la if WINDOWS @@ -179,12 +181,6 @@ ngspice_LDADD += frontend/help/libhlp.la endif endif -winmain.o: winmain.c ../config.h - $(COMPILE) -DSIMULATOR -o winmain.o -c $(srcdir)/winmain.c - -spice.lo: main.c ../config.h - $(LTCOMPILE) -DSIMULATOR -c -o spice.o $< - ## nutmeg: @@ -194,6 +190,8 @@ ngnutmeg_SOURCES = \ conf.h \ ngnutmeg.c +ngnutmeg_CPPFLAGS = $(AM_CPPFLAGS) + if WINDOWS ngnutmeg_SOURCES += winmain.c endif @@ -311,10 +309,17 @@ if TCLWIN LIBS += -lpsapi -ltcl84 -lBLT24 endif -libspice_la_SOURCES = +libspice_la_SOURCES = \ + main.c \ + conf.c \ + conf.h \ + ngspice.c \ + tclspice.c -libspice_la_LIBADD = ngspice.lo conf.lo \ - spice.lo \ +libspice_la_CPPFLAGS = $(AM_CPPFLAGS) -DSIMULATOR \ + -DTCLSPICE_version="\"$(TCLSPICE_VERSION)\"" + +libspice_la_LIBADD = \ @X_LIBS@ \ frontend/libfte.la @@ -337,7 +342,7 @@ libspice_la_LIBADD += \ if NDEV_WANTED libspice_la_LIBADD += \ - spicelib/devices/ndev/libndev.la + spicelib/devices/ndev/libndev.la endif if NUMDEV_WANTED @@ -383,7 +388,7 @@ libspice_la_LIBADD += \ maths/ni/libni.la \ maths/sparse/libsparse.la \ misc/libmisc.la \ - tclspice.lo $(LIBS) + $(LIBS) libspice_la_CFLAGS = $(AM_CFLAGS) libspice_la_LDFLAGS = -shared -Wl,--version-script=tclspice.map @@ -422,10 +427,6 @@ install-tclspice: $(mkinstalldirs) $(DESTDIR)$(libdir)/spice $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(libdir)/spice -tclspice.lo: tclspice.c - $(LTCOMPILE) -DTCLSPICE_version="\"$(TCLSPICE_VERSION)\"" -MT tclspice.lo -MD -MP -MF $(DEPDIR)/tclspice.Tpo -c -o tclspice.o $< - mv -f $(DEPDIR)/tclspice.Tpo $(DEPDIR)/tclspice.Plo - endif TCL_MODULE EXTRA_DIST += spice.def