--- Makefile.orig 2011-09-07 13:38:49.000000000 +0000 +++ Makefile 2012-06-23 00:57:46.000000000 +0000 @@ -2,9 +2,10 @@ # Edited for Debian GNU/Linux. #BINDIR = /usr/X11R6/bin DESTDIR = -BINDIR = /usr/local/bin -DOCDIR = /usr/share/doc/xppaut -MANDIR = /usr/local/man/man1 +BINDIR = $(PREFIX)/bin +DOCDIR = $(PREFIX)/share/doc/xppaut +EXAMPLESDIR = $(PREFIX)/share/examples/xppaut +MANDIR = $(MANPREFIX)/man/man1 # End Debian Edit ################################# # @@ -20,7 +21,7 @@ # Use Gnu compiler #CC= gcc # Use c99 to compile according to newer ISO C standards (IEEE Std 1003.1-2001) -CC= gcc -std=c99 -pedantic -D_XOPEN_SOURCE=600 -Wall +CC:= $(CC) -std=c99 -pedantic -D_XOPEN_SOURCE=600 -Wall #AUTLIBS= -lsundials_cvode -lX11 -lm #These are the 32bit compat libraries. AUTLIBS= -lm @@ -36,10 +37,10 @@ #CFLAGS= -g -O -m32 -DNON_UNIX_STDIO -DAUTO -DCVODE_YES -DHAVEDLL -DMYSTR1=$(MAJORVER) -DMYSTR2=$(MINORVER) -I/usr/X11R6/include #CFLAGS= -g -O -m64 -DNOERRNO -DNON_UNIX_STDIO -DAUTO -DCVODE_YES -DHAVEDLL -DMYSTR1=$(MAJORVER) -DMYSTR2=$(MINORVER) -I/usr/include/X11 -CFLAGS= -g -pedantic -O -m32 -DNOERRNO -DNON_UNIX_STDIO -DAUTO -DCVODE_YES -DHAVEDLL -DMYSTR1=$(MAJORVER) -DMYSTR2=$(MINORVER) -I/usr/include/X11 +CFLAGS+= -pedantic -O -DNOERRNO -DNON_UNIX_STDIO -DAUTO -DCVODE_YES -DHAVEDLL -DMYSTR1=$(MAJORVER) -DMYSTR2=$(MINORVER) -I$(LOCALBASE)/include #LDFLAGS= -m64 -L/usr/lib -L/usr/lib64 -LDFLAGS= -m32 -L/usr/X11R6/lib -LIBS= -lX11 -lm -ldl +LDFLAGS= -L$(LOCALBASE)/lib +LIBS= -lX11 -lm # NOTE: Recent (RedHat 8) versions of GCC seem to no longer have # the integer errno, so compile with the -DNOERRNO option as well # @@ -256,18 +257,27 @@ install: xppaut # Make necessary installation directories mkdir -p $(DESTDIR)$(BINDIR) +.ifndef NOPORTDOCS mkdir -p $(DESTDIR)$(DOCDIR)/html - mkdir -p $(DESTDIR)$(DOCDIR)/examples mkdir -p $(DESTDIR)$(DOCDIR)/xbm +.endif #mkdir -p /usr/X11R6/man/man1 mkdir -p $(DESTDIR)$(MANDIR) +.ifndef NOPORTEXAMPLES + mkdir -p $(DESTDIR)$(EXAMPLESDIR) +.endif + # Put everything home strip xppaut install -m 755 xppaut $(DESTDIR)$(BINDIR) - cp -r ode* $(DESTDIR)$(DOCDIR)/examples +.ifndef NOPORTEXAMPLES + cp -r ode* $(DESTDIR)$(EXAMPLESDIR) +.endif +.ifndef NOPORTDOCS cp -r help/* $(DESTDIR)$(DOCDIR)/html cp README *.pdf $(DESTDIR)$(DOCDIR) cp *.xbm $(DESTDIR)$(DOCDIR)/xbm +.endif cp xppaut.1 $(DESTDIR)$(MANDIR)