Simplify the Makefile.

This commit is contained in:
Emil Mikulic 2006-12-14 10:10:46 +00:00
parent 4cddcf96a5
commit 1a161a47ce

View File

@ -2,28 +2,15 @@
CC?=cc
CFLAGS?=-O
LIBS=`[ \`/usr/bin/uname\` = "SunOS" ] && echo -lsocket -lnsl`
TARGETS = bsd linux solaris
.PHONY: all $(TARGETS)
all:
@echo "+----- ---- --- -- -"
@echo "| Please run:"
@echo "| make <target>"
@echo "| Where target is one of the following:"
@echo "| $(TARGETS)"
@echo "+----- ---- --- -- -"
bsd linux:
rm -f darkhttpd
${MAKE} darkhttpd
solaris:
rm -f darkhttpd
${MAKE} darkhttpd LIBS="-lxnet -lsendfile"
all: darkhttpd
darkhttpd: darkhttpd.c
$(CC) $(CFLAGS) $(LIBS) darkhttpd.c -o darkhttpd
$(CC) $(CFLAGS) $(LIBS) darkhttpd.c -o $@
clean:
rm -f darkhttpd core darkhttpd.core