#
# $USAGI: Makefile.in,v 1.2 2001/02/13 16:41:59 yoshfuji Exp $
#

CC=@CC@
INSTALL=@INSTALL@

# XXX: remove -Iinclude -I../include
DEFS=-D_USAGI -DINET6 @DEFS@
CFLAGS=@CFLAGS@ $(DEFS)
LDFLAGS=@LDFLAGS@
LIBS=@LIBS@
LDLIBS=$(LIBS)

prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
sbindir=@sbindir@
mandir=@mandir@

BIN_TARGETS=tracepath6
MAN_TARGETS=#tracepath6.8

TARGETS=$(BIN_TARGETS) $(BIN_SUID_TARGETS) $(SBIN_TARGETS) $(SBIN_SUID_TARGETS)

OWNER=root
SUIDOWNER=$(OWNER)
GROUP=root
SUIDGROUP=$(GROUP)

MODE=755
SUIDMODE=4755
MANMODE=644

BIN_OWNER=$(OWNER)
BIN_GROUP=$(GROUP)
BIN_MODE=$(MODE)
BIN_SUID_OWNER=$(SUIDOWNER)
BIN_SUID_GROUP=$(SUIDGROUP)
BIN_SUID_MODE=$(SUIDMODE)

SBIN_OWNER=$(OWNER)
SBIN_GROUP=$(GROUP)
SBIN_MODE=$(MODE)
SBIN_SUID_OWNER=$(SUIDOWNER)
SBIN_SUID_GROUP=$(SUIDGROUP)
SBIN_SUID_MODE=$(SUIDMODE)

MAN_OWNER=$(OWNER)
MAN_GROUP=$(GROUP)
MAN_MODE=$(MANMODE)

all: $(TARGETS)

tracepath6: tracepath6.o

clean:
	-rm -f *.o $(TARGETS)

distclean: clean
	-rm -f config.log config.status config.cache config.h Makefile

install: all
	$(INSTALL) -D -d $(bindir)
	$(INSTALL) -s \
		-o $(BIN_OWNER) -g $(BIN_GROUP) \
		-m $(BIN_MODE) \
		$(BIN_TARGETS) \
		$(bindir)
#	$(INSTALL) -D -d $(mandir)/man8
#	$(INSTALL) \
#		-o $(MAN_OWNER) -g $(MAN_GROUP) \
#		-m $(MAN_MODE) \
#		$(MAN_TARGETS) \
#		$(mandir)/man8
