CONFIG = ../system.mk


# add or omit as needed (-D_NEED_SYS_PROTOS)
MOREDEFS =

# Do Not change anything below this line. It should be setup in config.

include $(CONFIG)


# for defs.h, struct.h
NETREK_INCLUDES = ../ntserv


SRCS = rsa_keycomp.c getpath.c data.c rsa_key2cap.c $(RANDOMC)
OBJS = rsa_keycomp.o getpath.o data.o $(STRDUPO) $(RANDOMO)

CFLAGS = $(OPT) -I$(NETREK_INCLUDES) $(MOREDEFS) $(FLAGS) $(DIRS)

LINTFLAGS = -habxc -I$(NETREK_INCLUDES) $(MOREDEFS) $(FLAGS)

all: $(PMAKE) rsa_keycomp rsa_key2cap

rsa_keycomp: $(OBJS)
	$(CC) $(CFLAGS) -o $@ $(OBJS)

rsa_keycomp.o: rsa_keycomp.c
	$(CC) $(CFLAGS) -c rsa_keycomp.c

dist:
	tar cvf keycomp.tar rsa_keycomp.c rsa_key2cap.c rsa_keycap README Makefile
	compress keycomp.tar
shar:
	shar rsa_keycomp.c rsa_key2cap.c rsa_keycap README Makefile > keycomp.shar

lint: $(SRCS)
	lint $(LINTFLAGS) -u $?
	touch lint

install: rsa_keycomp rsa_key2cap
	-@if [ ! -d $(LIBDIR) ]; then \
          /bin/mkdir $(LIBDIR); \
        fi
	$(INSTALL) $(INSTALLOPTS) rsa_keycomp $(LIBDIR)/rsa_keycomp
	$(INSTALL) $(INSTALLOPTS) rsa_key2cap $(LIBDIR)/rsa_key2cap

clean: rmdependencies
	/bin/rm -f *.o *.ln core rsa_keycomp rsa_key2cap

reallyclean: 
	/bin/rm -f rsa_keycomp rsa_key2cap *~ #*#

depend:
	makedepend $(CFLAGS) -f Makefile $(SRCS)

rmdependencies:
	makedepend


#####
# DO NOT DELETE THIS LINE -- make depend depends on it.
