# directories: OWNER= root GROUP= bin EXECMODE= 0750 MANMODE= 0644 BINDIR= /usr/local/libexec# directory for the executable ceptd MANDIR= /usr/local/man/man8# directory for the ceptds manpage ETCDIR= /usr/local/etc# directory for 'init file' and 'users file' # defaults for the ceptd : DEFAULTINITFILENAME= $(ETCDIR)/cept.init# modems default init file DEFAULTUSERSFILENAME= $(ETCDIR)/cept.users# file with allowed users DEFAULTLOGFILENAME= /var/log/log.cept# logfile for user online times DEFAULTMODEM= /dev/modem# char. special file for modem DEFAULTSPEED= 2400# modem baud rate DEFAULTSOCKETPORT= 20005# socket port for connections LOCKDIR= /var/spool/lock# lock dir for uucp-locks .ifdef NOMANCOMPRESS MANPAGE= ceptd.8 MANCOMPRESS= cat .else MANPAGE= ceptd.8.gz MANCOMPRESS= gzip -c -9 .endif # define these flags in $(DEFS): # if your system has ISDN: # -DISDN # if using uucp LOCK files: # -DUSE_LOCK=\"$(LOCKDIR)\" # allways define this for the modem to initalize right: # -DDEFAULTINITFILENAME=\"$(DEFAULTINITFILENAME)\" # if you want user online times to be logged in a file # -DDEFAULTLOGFILENAME=\"$(DEFAULTLOGFILENAME)\" # if you want to check users access rights: # -DDEFAULTUSERSFILENAME=\"$(DEFAULTUSERSFILENAME)\" # allways define this: # -DDEFAULTMODEM=\"$(DEFAULTMODEM)\" # allways define this: # -DDEFAULTSPEED=$(DEFAULTSPEED) # allways define this: # -DDEFAULTSOCKETPORT=$(DEFAULTSOCKETPORT) # try: (if one of these don't work, see config.h) # -DSUN # For sun-os (Not Solaris) # -DSVR4 # For System V (Arghh..) # -DLINUX # For Linux (Loosers Unix) # -DSCO # For SCO-Unix # -DBSD # For BSD Systems DEFS= -DDEFAULTSOCKETPORT=$(DEFAULTSOCKETPORT)\ -DUSE_LOCK=\"$(LOCKDIR)\"\ -DDEFAULTMODEM=\"$(DEFAULTMODEM)\"\ -DDEFAULTSPEED=$(DEFAULTSPEED)\ -DDEFAULTINITFILENAME=\"$(DEFAULTINITFILENAME)\"\ -DDEFAULTUSERSFILENAME=\"$(DEFAULTUSERSFILENAME)\"\ -DDEFAULTLOGFILENAME=\"$(DEFAULTLOGFILENAME)\"\ -DBSD # -DISDN\ # the GNU C-compiler: #CC = gcc #CCOPTS = -O #CCFLAGS = -Wswitch -Wcomment -Wshadow -Wpointer-arith -Wcast-qual\ # -Wtrigraphs# -Wunused # ... the lex is ... #LEX =flex ############################################################################## all: ceptd ${MANPAGE} OBJS = ceptd.o level2.o modeminit.o socket.o term.o lex.yy.o isdn.o SRC = ceptd.c level2.c modeminit.c socket.c term.c lex.yy.c isdn.c INC = config.h cept.h ../xcept/protocol.h .c.o: config.h cept.h ../xcept/protocol.h $(CC) -c $(CFLAGS) $(DEFS) $*.c lex.yy.c: lex_yy $(LEX) -s -i -p lex_yy ceptd: $(OBJS) $(CC) $(OBJS) -L. -o ceptd install: ceptd ${MANPAGE} ${INSTALL} -c -o ${OWNER} -g ${GROUP} -m ${EXECMODE} ceptd ${BINDIR}/ceptd ${INSTALL} -c -o ${OWNER} -g ${GROUP} -m ${MANMODE} ${MANPAGE} ${MANDIR}/${MANPAGE} ${MANPAGE}: ceptd.8.template sed -e 's|--- The permissions file.|$(DEFAULTUSERSFILENAME)|g'\ -e 's|--- The initalization file.|$(DEFAULTINITFILENAME)|g'\ -e 's|--- The log file.|$(DEFAULTLOGFILENAME)|g'\ ceptd.8.template | ${MANCOMPRESS} > ${MANPAGE} clean: rm -f ${MANPAGE} *.o TAGS ceptd veryclean: rm -f ceptd.8 *.o TAGS ceptd lex.yy.c *.zoo TAGS: $(SRC) $(INC) etags -e *.[ch]