home *** CD-ROM | disk | FTP | other *** search
Makefile | 1993-05-04 | 3.2 KB | 110 lines |
- # @(#)Makefile 1.13 4/6/93
- #
-
- CC = gcc
- 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:
- #
- # - 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, 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.
-
- #DBLIB42 = -DDBLIB42 # Comment this if your version
- # of DBlib is older than
- # version 4.2
-
- #SET_VAL = -DUSERVAL_SET_FATAL # Uncomment this if you wish
- # to get a fatal error message
- # if you attempt to set on of
- # Sybperl's variables from a
- # script. Normally such
- # actions are silently ignored.
-
- #NULL_UNDEF = -DNULL_IS_UNDEF # Uncomment this to get
- # 'undef' values returned by
- # &dbnextrow when NULL values
- # are retrieved. Otherwise,
- # the string 'NULL' is returned.
-
- CFLAGS = -O2 -g
- CPPFLAGS = -I$(PERLSRC) -I$(LOCINCS) -I$(SYBINCS) $(PERL_VERSION) \
- $(SAVESTR) $(HAS_CALLBACK) $(OLD_SYBPERL) $(DBLIB42) \
- $(SET_VAL)
- 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)
- rm -f $(UPERL).bak
-
-
- 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 \
- eg/dbschema.pl eg/dbtext.pl eg/README >sybperl.shar
-
-
- tar:
- rm -f sybperl.tar
- tar cvfB sybperl.tar 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 \
- eg/dbschema.pl eg/dbtext.pl eg/README
-
-
-
-
-
-