Makefile-bsd 850 Bytes
Newer Older
Arne Øslebø's avatar
Arne Øslebø committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
PREFIX ?= /usr/local

all: ssmping asmping ssmpingd mcfirst

OBJ = ssmpngcl.o ssmpingc.o joinch.o joingrp.o

ssmping: $(OBJ)
	$(CC) $(CFLAGS) $(OBJ) -o ssmping ssmping.c

asmping: $(OBJ)
	$(CC) $(CFLAGS) $(OBJ) -o asmping asmping.c

ssmpingd: $(OBJ)
	$(CC) $(CFLAGS) $(OBJ) -o ssmpingd ssmpingd.c

mcfirst: $(OBJ)
	$(CC) $(CFLAGS) $(OBJ) -o mcfirst mcfirst.c

install: ssmping asmping ssmpingd mcfirst
	install -D ssmping $(DESTDIR)$(PREFIX)/bin/ssmping
	install -D asmping $(DESTDIR)$(PREFIX)/bin/asmping
	install -D ssmpingd $(DESTDIR)$(PREFIX)/bin/ssmpingd
	install -D mcfirst $(DESTDIR)$(PREFIX)/bin/mcfirst
	install -D ssmping.1 $(DESTDIR)$(PREFIX)/man/man1/ssmping.1
	install -D asmping.1 $(DESTDIR)$(PREFIX)/man/man1/asmping.1
	install -D mcfirst.1 $(DESTDIR)$(PREFIX)/man/man1/mcfirst.1

clean:
	rm -f $(OBJ) ssmping asmping ssmpingd mcfirst