# $id$
#
# Smakefile for Inetd
#
# Copyright  1993 AmiTCP/IP Group, <amitcp-group@hut.fi>
#                  Helsinki University of Technology, Finland.
#
# Created      : Mon Mar 22 07:17:50 1993 ppessi
# Last modified: Wed Oct 20 07:11:25 1993 ppessi
#
# $Log: Smakefile,v $
# Revision 1.3  1993/10/20  05:17:23  ppessi
# Changed to uniform Smakefile.
#
# Revision 1.2  1993/10/14  00:04:15  ppessi
# SCOPTIONS is now created automatically from Smakefile
#
# Revision 1.1  1993/06/04  11:42:01  jraja
# Initial revision
#

PROG=  inetd
VERS=  2

SRC=   $(PROG).c 
OBJS=  $(PROG).o

LIBS= LIB NETLIB:net.lib 

CC=      sc
LD=      sc
MAKE=    smake
TAGS=    etags
RM=      delete quiet
MKDIR=   makedir
INSTALL= copy nopro dates all
BUMPREV= BumpRev

DEST=    AmiTCP:

DEBUGFLAGS= NoOptimize DEBUG=FULLFLUSH
OPTFLAGS= Optimize Stripdebug NoDebug
CFLAGS = $(OPTFLAGS)

# "DEF=RCS_ID_C=static char *rcsid"
DEFS=   "DEF=RCS_ID_C=//" \
         DEF=AMIGA=1 DEF=HAVE_UTMP=0 DEF=HAVE_TZONE=0
IDIRS=   IDIR=netinclude: 
SCOPTIONS= STRINGMERGE STRUCTUREEQUIVALENCE \
	 NOSTACKCHECK NOMULTIPLEINCLUDES \
	 NOERRORSOURCE NOVERSION NOERRORHIGHLIGHT \
	 SMALLCODE SMALLDATA \
	 MAP MAPHUNK MAPSYMBOLS MAPLIB MAPXREFERENCE \
	 LINKEROPTIONS=plain NOICONS BATCH \
	 OPTINL OPTTIME OPTCOMP=5 OPTDEP=5 OPTRDEP=5 \
	 $(IDIRS) $(DEFS) \
	 IGNORE=224 IGNORE=92

all: $(PROG)

$(PROG): SCOPTIONS $(OBJS)
	$(CC) LINK TO $@ OBJ $(OBJS) BATCH $(LIBS) $(CFLAGS)

debug:
	$(MAKE) "CFLAGS=$(DEBUGFLAGS)" "LIBS=$(DEBUGLIBS)" $(PROG)

.c.o:
	-@$(RM) $*.o  > nil:
	$(CC) $(CFLAGS) $*.c

$(PROG).o: 
	-$(BUMPREV) $(VERS) $(PROG)_rev
	-@$(RM) $(PROG).o > nil:
	$(CC) $(CFLAGS) $ $(PROG).c

SCOPTIONS: Smakefile
	copy to $@ <from < 
$(SCOPTIONS)
<

install: all $(DEST)bin $(DEST)doc
	$(INSTALL) $(PROG) $(DEST)bin
	$(INSTALL) $(DOCS) $(DEST)doc	

$(DEST)bin:
	-$(MKDIR) $@
$(DEST)doc:
	-$(MKDIR) $@	

TAGS:	$(SRCS)
	$(TAGS) $(SRCS)

clean:
	-$(RM) \#?.o \#?.map \#?.lnk SCOPTIONS

# DO NOT DELETE THIS LINE -- make depend depends on it.
inetd.o: inetd.c
