home *** CD-ROM | disk | FTP | other *** search
Makefile | 1992-02-10 | 2.5 KB | 85 lines |
- # @(#)Makefile 1.6 11/25/91
- #
-
- CC = cc
- PERLSRC = .. # where to find uperl.o
- SYBINCS = /usr/local/sybase/include # where to find the sybase .h files
- LOCINCS = # other includes ?
- SYBLIBDIR = /usr/local/lib # Sybase libraries
- SYBLIBS = -lsybdb # db-library
-
- # Uncomment this if you are compiling sybperl for Perl version 3.xx
-
- # PERL_VERSION = -DVERSION3
-
- # The Perl/Sybase savestr() conflict.
- # Both Perl and Sybase DB-Library have a function called savestr(),
- # and this creates a problem when using functions such as dbcmd().
- # There are several ways around this.
- # You can:
- #
- # - define BROKEN_DBCMD: this enables some code emulating
- # dbcmd() that I've written.
- # - Recompile uperl.o with a -Dsavestr=psvestr (or something similar).
- # - Edit an existing uperl.o and change _savestr to _psvestr.
- #
- # To use the first option, uncomment the following definitions for
- # SAVESTR and UPERL
- # SAVESTR = -DBROKEN_DBCMD
- # UPERL = $(PERLSRC)/uperl.o
- #
- # To use the second option, you have to reconfigure & recompile Perl
- # manually, and then set compile sybperl with the following line
- # uncommented:
- # UPERL = $(PERLSRC)/uperl.o
- #
- # The default is to use the third solution:
- UPERL = uperl2.o
-
-
- HAS_CALLBACK= -DHAS_CALLBACK # Remove this if you don't
- # have Perl 4 patchlevel 18
- # User defined, perl based
- # error/message handlers are
- # not possible without this, however.
- OLD_SYBPERL= -DOLD_SYBPERL # some backward compatibility stuff.
-
- CFLAGS = -O #
- CPPFLAGS = -I$(PERLSRC) -I$(LOCINCS) -I$(SYBINCS) $(PERL_VERSION) \
- $(SAVESTR) $(HAS_CALLBACK) $(OLD_SYBPERL)
- BINDIR = /usr/local/bin # where does the executable go
- PERLLIB = /usr/local/lib/perl # where does lib/sybperl.pl
- # and lib/sybdb.ph go
- MANDIR = /usr/local/man # where do we put the manual page
- MANEXT = l
-
-
- sybperl: $(UPERL) sybperl.o
- $(CC) $(CFLAGS) -L$(SYBLIBDIR) $(UPERL) sybperl.o $(SYBLIBS) -lm -o sybperl
-
- sybperl.o: sybperl.c
- $(CC) -c $(CFLAGS) $(CPPFLAGS) sybperl.c
-
- # Create uperl.o IF you wish to use the 3rd way of resolving the
- # Perl/Sybase savestr conflict.
- $(UPERL): $(PERLSRC)/uperl.o
- cp $(PERLSRC)/uperl.o $(UPERL)
- perl -p -i.bak -e 's/savestr/psvestr/g;' $(UPERL)
-
- clean:
- rm -f sybperl *.o *~ core
-
- install: sybperl
- install -s -m 775 sybperl $(BINDIR)
- cp lib/syb*.p? $(PERLLIB)/perllib.pl
- cp sybperl.1 $(MANDIR)/man$(MANEXT)/sybperl.$(MANEXT)
-
- shar:
- rm -f sybperl.shar
- shar.pl README PACKING.LST BUGS CHANGES Makefile sybperl.c \
- sybperl.1 patchlevel.h lib/sybperl.pl lib/sybdb.ph t/sbex.pl \
- eg/sql.pl eg/space.pl eg/capture.pl eg/report.pl >sybperl.shar
-
-
-
-