| 1 |
# Makefile for the Simple Sockets Library (C version) |
| 2 |
# |
| 3 |
# Authors: Charles E. Campbell, Jr., Ph.D. |
| 4 |
# Terry McRoberts |
| 5 |
# |
| 6 |
# |
| 7 |
# Building the SSL: |
| 8 |
# |
| 9 |
# Some Unix (tm) boxes need to run a program called "ranlib" (ex. Sun) |
| 10 |
# You will notice below a "#ranlib ..." line; if your machine needs it, |
| 11 |
# remove the "#". |
| 12 |
# |
| 13 |
# Please modify the Makefile below for the following exceptions: |
| 14 |
# |
| 15 |
# Compiler Exceptions Loader Exceptions |
| 16 |
# SCO |
| 17 |
# Solaris 2.1 |
| 18 |
# |
| 19 |
# You may also wish to set the "RDCOLOR" environment variable in your |
| 20 |
# login/profile/startup-sequence/etc file to be the string where the |
| 21 |
# <rdcolor.dat> file is to be located. Furthermore, you may wish to |
| 22 |
# modify the <rdcolor.dat> file to include escape sequences for your |
| 23 |
# favorite terminal(s) (should be fairly obvious by inspection how to |
| 24 |
# do so using some editor). |
| 25 |
# |
| 26 |
# Option: The PortMaster can optionally use a "firewall" to keep unwanted |
| 27 |
# visitors out. The PortMaster (Spm) uses an environment variable |
| 28 |
# (SPMFIREWALL) to specify where the firewall file is located. |
| 29 |
# One may also start up the PortMaster (Spm -f firewallfilename). |
| 30 |
# Please read the documentation on this. |
| 31 |
|
| 32 |
CC = cc |
| 33 |
|
| 34 |
OBJ = Saccept.o Sprintf.o Stest.o outofmem.o \ |
| 35 |
Sclose.o Sprtskt.o Stimeoutwait.o rdcolor.o \ |
| 36 |
Sgets.o Sputs.o Svprintf.o sprt.o \ |
| 37 |
Smaskwait.o Sread.o Swait.o srmtrblk.o \ |
| 38 |
Smkskt.o Sreadbytes.o Swrite.o stpblk.o \ |
| 39 |
Sopen.o Srmsrvr.o error.o stpnxt.o \ |
| 40 |
Sopenv.o Sscanf.o fopenv.o strnxtfmt.o \ |
| 41 |
Speek.o cprt.o Speername.o Speeraddr.o \ |
| 42 |
Sinit.o |
| 43 |
|
| 44 |
# LIB: name of library |
| 45 |
LIB = simpleskts.a |
| 46 |
|
| 47 |
# EXETGT: where to put executables, as seen from the viewpoint of the EXE |
| 48 |
# subdirectory |
| 49 |
EXETGT=../EXE |
| 50 |
|
| 51 |
# usual compiler stuff |
| •52 |
CFLAGS += -O -I./HDR |
| 53 |
LOADLIBES = ../$(LIB) |
| 54 |
|
| 55 |
# for SCO UNIX: |
| 56 |
# LOADLIBES = ../$(LIB) -lsocket |
| 57 |
|
| 58 |
# for Solaris 2.1 |
| 59 |
# LOADLIBES = ../$(LIB) -lnsl |
| 60 |
|
| 61 |
# for g++ compiler: (tnx to Gary Johnson) |
| 62 |
# CFLAGS= -Wall -ansi -pedantic -O -I./HDR |
| 63 |
|
| 64 |
# all : $(LIB) exes examples |
| 65 |
all : $(LIB) |
| 66 |
|
| 67 |
$(LIB) : $(OBJ) |
| •68 |
ar r simpleskts.a $(OBJ) |
| 69 |
# ranlib simpleskts.a |
| 70 |
# /bin/rm -f *.o |
| 71 |
@echo "finished updating simpleskts.a" |
| 72 |
|
| 73 |
exes : $(LIB) |
| 74 |
( cd EXE; \ |
| 75 |
make CC=$(CC) LIB=$(LIB) CFLAGS="-O -I../HDR" LOADLIBES=$(LOADLIBES) EXETGT=$(EXETGT) ) |
| 76 |
|
| 77 |
examples : $(LIB) |
| 78 |
( cd EXAMPLES; \ |
| 79 |
make CC=$(CC) LIB=$(LIB) CFLAGS="-O -I../HDR" LOADLIBES=$(LOADLIBES) ) |
| 80 |
|
| 81 |
distclean clean : |
| 82 |
@/bin/rm -f *.a *.bak *.err $(OBJ) |
| 83 |
(cd EXE; make clean ) |
| 84 |
(cd EXAMPLES ; make clean ) |
| 85 |
@echo "All object files, the simpleskts library, and executables are now gone" |
| 86 |
|
| 87 |
install : |