home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume25
/
sybperl
/
part01
/
Makefile
< prev
next >
Wrap
Makefile
|
1991-11-11
|
2KB
|
73 lines
# @(#)Makefile 1.4 9/9/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
CFLAGS = -O #
CPPFLAGS = -I$(PERLSRC) -I$(LOCINCS) -I$(SYBINCS) $(PERL_VERSION) $(SAVESTR)
BINDIR = /usr/local/bin # where does the executable go
PERLLIB = /usr/local/lib/perl # where does lib/sybperl.pl 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 *~
install: sybperl
install -s -m 775 sybperl $(BINDIR)
cp lib/sybperl.pl $(PERLLIB)/perllib.pl
pc sybperl.1 $(MANDIR)/man$(MANEXT)/sybperl.$(MANEXT)
shar:
rm -f sybperl.shar
shar.pl README PACKING.LST BUGS Makefile sybperl.c sybperl.1 patchlevel.h lib/sybperl.pl t/sbex.pl >sybperl.shar