--- makemake.orig 2009-02-28 16:57:42.000000000 -0500
+++ makemake 2009-02-28 16:58:30.000000000 -0500
#-----------------------------------------------------------------------
#-----------------------------------------------------------------------
# Shared library creation.
+CSHARED_LIB=$CSHARED_LIB
# The libraries that the shared PGPLOT library depends upon.
# This is for systems that allow one to specify what libraries
$(SHARED_LIB): $(PG_ROUTINES) $(PG_NON_STANDARD) \
$(GR_ROUTINES) $(DISPATCH_ROUTINE) $(DRIVERS) $(SYSTEM_ROUTINES)
- $(SHARED_LD) `ls $(PG_ROUTINES) \
+ $(SHARED_LD) -o $@ `ls $(PG_ROUTINES) \
$(PG_NON_STANDARD) $(GR_ROUTINES) $(DISPATCH_ROUTINE) \
$(DRIVERS) $(SYSTEM_ROUTINES) | sort | uniq` $(SHARED_LIB_LIBS)
grivas.o : $(DRVDIR)/gadef.h
grtv00.o : $(DRVDIR)/imdef.h
pgxwin.o : $(DRVDIR)/pgxwin.h
-pndriv.o : ./png.h ./pngconf.h ./zlib.h ./zconf.h
x2driv.o figdisp_comm.o: $(DRVDIR)/commands.h
-cpg: libcpgplot.a cpgplot.h cpgdemo
+cpg: libcpgplot.a cpgplot.h $(CSHARED_LIB) cpgdemo
@echo '*** Finished compilation of the C PGPLOT wrapper library ***'
@echo 'Note that if you plan to install the library in a different'
- @echo 'directory than the current one, both libcpgplot.a and cpgplot.h'
+ @echo 'directory than the current one, both libcpgplot.a, $(CSHARED_LIB), and cpgplot.h'
pgbind: $(SRC)/cpg/pgbind.c
$(CCOMPL) $(CFLAGC) $(SRC)/cpg/pgbind.c -o pgbind
-libcpgplot.a cpgplot.h: $(PG_SOURCE) pgbind
- ./pgbind $(PGBIND_FLAGS) -h -w $(PG_SOURCE)
+cpgplot.h: $(PG_SOURCE) pgbind
+ ./pgbind $(PGBIND_FLAGS) -h $(PG_SOURCE)
+libcpgplot.a : cpgplot.h
+ ./pgbind $(PGBIND_FLAGS) -w $(PG_SOURCE)
$(CCOMPL) -c $(CFLAGC) cpg*.c
ar ru libcpgplot.a cpg*.o
-cpgdemo: cpgplot.h $(SRC)/cpg/cpgdemo.c libcpgplot.a
+$(CSHARED_LIB): cpgplot.h
+ ./pgbind $(PGBIND_FLAGS) -w $(PG_SOURCE)
+ $(CCOMPL) -c $(CFLAGC) cpg*.c
+ $(CSHARED_LD) -o $@ cpg*.o $(SHARED_LIB)
+cpgdemo: cpgplot.h $(SRC)/cpg/cpgdemo.c $(CSHARED_LIB)
$(CCOMPL) $(CFLAGD) -c -I. $(SRC)/cpg/cpgdemo.c
$(FCOMPL) -o cpgdemo cpgdemo.o $(CPGPLOT_LIB) $(LIBS)
pgmdemo: pgmdemo.o libXmPgplot.a
$(FCOMPL) -o pgmdemo pgmdemo.o -L`pwd` -lXmPgplot $(CPGPLOT_LIB) $(MOTIF_LIBS)
-pgmdemo.o: $(XMDIR)/pgmdemo.c XmPgplot.h libcpgplot.a cpgplot.h
+pgmdemo.o: $(XMDIR)/pgmdemo.c XmPgplot.h $(CSHARED_LIB) cpgplot.h
$(CCOMPL) $(CFLAGD) -c -I`pwd` $(MOTIF_INCL) $(XMDIR)/pgmdemo.c
pgawdemo: pgawdemo.o libXaPgplot.a
$(FCOMPL) -o pgawdemo pgawdemo.o -L`pwd` -lXaPgplot $(CPGPLOT_LIB) $(ATHENA_LIBS)
-pgawdemo.o: $(XADIR)/pgawdemo.c XaPgplot.h libcpgplot.a cpgplot.h
+pgawdemo.o: $(XADIR)/pgawdemo.c XaPgplot.h $(CSHARED_LIB) cpgplot.h
$(CCOMPL) $(CFLAGD) -c -I`pwd` $(ATHENA_INCL) $(XADIR)/pgawdemo.c