#
# $Id:
#

#
# Definitions:
#
SRCS = wakeup.c
OBJS = wakeup.o
PROG = wakeup

# Change this to install the binary and the man page at the right location
PREFIX ?= /usr/local

# Change this to the name of the libnet-config program
LIBNET_CONFIG = libnet-config-1.1

CC = cc
CFLAGS = -O2 -Wall `${LIBNET_CONFIG} --cflags --defines`
LDFLAGS = `${LIBNET_CONFIG} --libs`
LD = ${CC}
RM = /bin/rm -f

all: ${PROG}

install: all
	install -c wakeup.man "${PREFIX}/man/man1/wakeup.1"
	install -c wakeup "${PREFIX}/bin/wakeup"

${PROG}: ${OBJS}
	${CC} ${OBJS} ${LDFLAGS} -o ${PROG}

.c.o: 
	${CC} ${CFLAGS} -c $<

clean:
	${RM} ${PROG} ${OBJS} *~ *.core
