#################################################
#                                               #
# lwpnfsd Makefile Version 3.0h 08/08/93    fjw #
#                                               #
#################################################
#                                               #
# One can enable various debugging options here #
#                                               #
#################################################
CC      = cc
CC2     = cc

##########################
#                        #
# Dependencies Section:  #
#                        #
##########################
make:
	@echo 'Make what?  You must tell which system to make lwpnfsd for:'
	@echo 'make sun     - Sun or compatible running Sun-OS'
	@echo 'make bsd     - Generic Berkeley Unix'
	@echo 'make sys3    - Generic ATT System III or System V'
	@echo 'make sys5    - Generic ATT System III or System V'
	@echo 'make svr4    - ATT System V.4 UNIX'
	@echo 'make univel  - Univel System VR4 variant'
	@echo 'make solaris - Solaris'
	@echo 'make hpux    - HPUX 8.07 System (Possibly others)'
	@echo 'make sgi     - Silicon Graphics machine'
	@echo 'make sco     - Santa Cruz Organization (SCO)'
	@echo 'make aix     - IBM AIX for RS/6000'


################################
#                              #
# Please add your system here  #
#                              #
################################
OBJS    = lwpnfsd.o lwpprint.o lwplock.o

all: lwpnfsd

lwpnfsd: $(OBJS)
	$(CC) -o lwpnfsd $(OBJS) $(CFLAGS)

########################################
#
# Possible defines and their uses include:
# INT_SIG   - Indicates that your system wants to see the signal() function
#             take an integer functional argument, rather than void.
# BSD_QUEUE - Indicates that the commands to manipulate the print queues
#             are lpq, lprm, etc.
# AIX_QUEUE - Indicates that the commands to manipulate the print queues
#             are enq and such.  Also uses the AIX printqueue files.
# SVR4_QUEUE - Indicates that the commands to manipulate the print queues
#             are lpstat, cancel, etc.
# SCO_QUEUE - Indicates that the commands to manipulate the print queues
#             are lpstat, cancel, etc., but different from SVR4
# SVR4_PRINTING - Indicates that /usr/spool/lp/... files are used to determine
#                 what print queues are available.  If not defined, then
#                 /etc/printcap is parsed.
# FOURTEEN_CHAR - Indicates that there is a fourteen character limit on
#                 filenames.
# HP8_PRINTING - Indicates that SVR4 type utilities are to be used to print
#                with, but /etc/printcap mechanism is to be used to get the
#                printers.  Should be modified to do HP properly at a later
#                date. HPUX 9.?? appears to use the SVR4 file mechanisms ...
# SYSV32 - Indicates a System V release III derivative system
# AIX - Indicates an AIX system
# SCO - Indicates an SCO system
# SGI - Indicates an SGI system
# PORTMAP - Indicates that a Univel machine should include some include files
#           that it otherwise doesn't.  This symbol is checked by the include
#           files on the Univel machine, not in this source code
# SHADW - Indicates that a Shadow password file is in use
# WINNFS - Indicates that compilation is for a Wollongong WIN system
# AVION - Indicates that the lp command in an SYSV32 variant wants the
#         printjob title to be flagged with the -t keyword rather than
#         the -T keyword.  This includes, but is not limited to AVION machines
# Make commands for specific systems:
#
########################################
#Sun
sun:
	make lwpnfsd "CFLAGS= -O -DBSD_QUEUE"

#Berkeley Unix
bsd:
	make lwpnfsd "CFLAGS= -O -DBSD_QUEUE"

#Generic ATT System III or System V (not R4)
sys5:
	make lwpnfsd "CFLAGS= -O -DSYSV32 -DBSD_QUEUE -DFOURTEEN_CHAR"

#Generic ATT System III or System V (not R4)
sys3:
	make lwpnfsd "CFLAGS= -O -DSYSV32 -DBSD_QUEUE -DFOURTEEN_CHAR"

#Generic System V R4
svr4:
	make lwpnfsd "CFLAGS= -O -DINT_SIG -DFOURTEEN_CHAR -DSVR4_PRINTING -DSVR4_QUEUE -DSHADW -lrpcsvc -lsocket -lresolv -lnsl -lx -lnls /usr/ucblib/libucb.a"

#Univel System V R4
univel:
	make lwpnfsd "CFLAGS= -O -DPORTMAP -DSVR4_PRINTING -DSVR4_QUEUE -DSHADW -lrpcsvc -lsocket -lresolv -lnsl"

#Solaris 2.1
solaris:
	make lwpnfsd "CFLAGS= -w -O -DINT_SIG -DSVR4_PRINTING -DSCO_QUEUE -DSHADW -lrpcsvc -lsocket -lresolv -lnsl"

#IBM RS/6000 or PS/2 running AIX
aix:
	make lwpnfsd "CFLAGS= -O -DAIX -DAIX_QUEUE"

#Silicon Graphics machine
sgi:
#old    make lwpnfsd "CFLAGS= -O -cckr -I/usr/include/sun -I/usr/include/bsd -DSYSV32 -DSGI -DBSD_QUEUE -lrpcsvc -lsun -lbsd"
	make lwpnfsd "CFLAGS= -O -cckr -I/usr/include/sun -I/usr/include/bsd -DSVR4_PRINTING -DSCO_QUEUE  -lrpcsvc -lsun -lbsd"

#Intel hardware running Santa Cruz Operation's SCO Unix
sco:
	make lwpnfsd "CFLAGS= -O -DSYSV32 -DSCO -DSVR4_PRINTING -DSCO_QUEUE -DFOURTEEN_CHAR -lprot -lrpcsvc -lrpc -lsocket -lx -lc_s /usr/lib/libcrypt_d.a"

#HPUX Version 8.07 (possibly others)
hpux:
	make lwpnfsd "CFLAGS= -O -DSVR4_QUEUE -DHP8_PRINTING"
