top_builddir=..
# Generated automatically from Makefile.clean by configure.
# Copyright (c)1994-1999 Begemot Computer Associates. All rights reserved.
# See the file COPYRIGHT for details of redistribution and use.



prefix	= /usr/local
exec_prefix = ${prefix}
includedir = ${prefix}/include
libdir = ${exec_prefix}/lib
mandir = ${prefix}/man
srcdir	= .
bindir  = ${exec_prefix}/bin
top_srcdir = ..

INSTALL	= /usr/bin/install -c
INSTALL_PROG = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_DIR = $(top_srcdir)/Config/mkinstalldirs

CFLAGS = -g -O2
LDFLAGS =  -g
LIBS = 

DBGFLAGS = -g
WFLAGS = -Wall -Wimplicit -Wformat
COPT = -O2 -fomit-frame-pointer
DEFS =  -DFPP=1 -DUSE_REGISTERS=1 -DHAVE_NET_IF_VAR_H=1 -DHAVE_SIN_LEN=1 -DHAVE_PATHS_H=1 -DHAVE_CFMAKERAW=1 -DHAVE_BZERO=1 -DHAVE_BCOPY=1 -DHAVE_MS_SYNC=1 -DHAVE_O_ASYNC=1 -DHAVE_UINT=1 -D_PATH_XTERM=\"/usr/X11R6/bin/xterm\" -DINS_I386=1 -DFLOAT_I386=1 -DSYSTEMS=\"freebsd4.0\" -DPROCS=\"i386\" 

LIB_SOCKET = 

EPP_TARGETS =  epp_fifo epp_bpf epp_tun
AS11 = 

BEGEMOT_INCLUDE = /usr/local///include
BEGEMOT_LIBDIR = /usr/local///lib

LIBDIR = ${prefix}/share/p11
IODIR = ${exec_prefix}/libexec/p11

DEFS += -DVERSION=\"`cat $(top_srcdir)/VERSION`\"
DEFS += -DLIBDIR=\"$(LIBDIR)\"
DEFS += -DIODIR=\"$(IODIR)\"
CFLAGS += $(DBGFLAGS) $(WFLAGS) $(COPT) $(DEFS) -I$(srcdir) -I$(top_srcdir) -I/usr/local/include -I$(BEGEMOT_INCLUDE)
LDFLAGS += $(DBGFLAGS) -L/usr/local/lib -L$(BEGEMOT_LIBDIR) -R$(BEGEMOT_LIBDIR)

LINK = $(top_builddir)/libtool --mode=link gcc
CC = gcc

AS11 = 
AS_TARGET = @AS_TARGET@
# Copyright (c)1994-1999 Begemot Computer Associates. All rights reserved.
# See the file COPYRIGHT for details of redistribution and use.

SRC =	epp_bpf.c epp_fifo.c epp_tun.c epp_tap.c eppsup.c \
	lp_file.c \
	tty_fifo.c tty_net.c tty_tty.c tty_xterm.c ttysup.c
OBJ =	$(SRC:.c=.o)

CFLAGS += -I$(top_srcdir) -I$(top_srcdir)/libutil
LDFLAGS += -L../libutil

TARGETS += $(EPP_TARGETS) lp_file tty_fifo tty_net tty_tty tty_xterm
CLEAN += $(TARGETS)

SUID = epp_tun epp_tap epp_bpf

all: $(TARGETS)

tty_fifo: tty_fifo.o ttysup.o
	$(LINK) $(LDFLAGS) -o tty_fifo tty_fifo.o ttysup.o -lutil -lbegemot $(LIBS)
tty_net: tty_net.o ttysup.o
	$(LINK) $(LDFLAGS) -o tty_net tty_net.o ttysup.o -lutil -lbegemot $(LIBS) $(LIB_SOCKET)
tty_tty: tty_tty.o ttysup.o
	$(LINK) $(LDFLAGS) -o tty_tty tty_tty.o ttysup.o -lutil -lbegemot $(LIBS)
tty_xterm: tty_xterm.o ttysup.o
	$(LINK) $(LDFLAGS) -o tty_xterm tty_xterm.o ttysup.o -lutil -lbegemot $(LIBS)

epp_bpf: epp_bpf.o eppsup.o
	$(LINK) $(LDFLAGS) -o epp_bpf epp_bpf.o eppsup.o -lutil -lbegemot $(LIBS)
epp_fifo: epp_fifo.o eppsup.o
	$(LINK) $(LDFLAGS) -o epp_fifo epp_fifo.o eppsup.o -lutil -lbegemot $(LIBS)
epp_tun: epp_tun.o eppsup.o
	$(LINK) $(LDFLAGS) -o epp_tun epp_tun.o eppsup.o -lutil -lbegemot $(LIBS)
epp_tap: epp_tap.o eppsup.o
	$(LINK) $(LDFLAGS) -o epp_tap epp_tap.o eppsup.o -lutil -lbegemot $(LIBS)

lp_file: lp_file.o
	$(LINK) $(LDFLAGS) -o lp_file lp_file.o -lutil -lbegemot $(LIBS)

install: $(TARGETS)
	$(INSTALL_DIR) $(IODIR)
	for i in $(TARGETS) ; do	\
		$(INSTALL_PROG) $$i $(IODIR) ;	\
		for j in $(SUID) ; do \
			if test "$$i" = "$$j" ; then \
				chown 0 $(IODIR)/$$i ; \
				chgrp 0 $(IODIR)/$$i ; \
				chmod +s $(IODIR)/$$i ; \
			fi ; \
		done ; \
	done
# Copyright (c)1994-1999 Begemot Computer Associates. All rights reserved.
# See the file COPYRIGHT for details of redistribution and use.

.c.o:
	@test -d .deps || mkdir .deps >/dev/null 2>&1
	$(CC) $(CFLAGS) -c -Wp,-MD,.deps/$*.d $< -o $@

.c.s:
	@test -d .deps || mkdir .deps >/dev/null 2>&1
	$(CC) $(CFLAGS) -S -Wp,-MD,.deps/$*.d $< -o $@

.c.p:
	@test -d .deps || mkdir .deps >/dev/null 2>&1
	$(CC) $(CFLAGS) -E -Wp,-MD,.deps/$*.d $< >$@

ifndef DEPS
DEPS = $(SRC:%.c=.deps/%.d)
endif


LIBTOOL_DEPS = 
libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status --recheck


-include $(DEPS)
# Copyright (c)1994-1999 Begemot Computer Associates. All rights reserved.
# See the file COPYRIGHT for details of redistribution and use.

clean:
	-rm -f $(OBJ) $(CLEAN) core *.core *~ a.out .deps/*

distclean: clean
	-rm -f Makefile
	-rm -rf .deps

veryclean: distclean
