# $Id: Makefile,v 1.2 1999/04/13 08:34:44 jj Exp $
# Simple makefile for SparcLinux's ethtool.

PROG := ethtool
OBJS := ethtool.o
SRC := ethtool.c
HDRS := ethtool.h

all: $(PROG)

$(PROG): $(OBJS)
	gcc -O2 -o $(PROG) $(OBJS)

$(OBJS): $(SRC) $(HDRS)
	gcc -O2 -c -o $(OBJS) $(SRC)

clean:
	rm -f $(PROG) $(OBJS)

install:
	mkdir -p $(INSTALLPREFIX)/usr/{sbin,man/man8}
	install -m 0755 -s $(PROG) $(INSTALLPREFIX)/usr/sbin/$(PROG)
	install -m 0644 $(PROG).8 $(INSTALLPREFIX)/usr/man/man8/$(PROG).8
	