User specifies platform, like mpg123.

This commit is contained in:
Emil Mikulic 2003-12-13 14:08:36 +00:00
parent 108eb4cce3
commit af46f81440
1 changed files with 25 additions and 8 deletions

View File

@ -1,12 +1,29 @@
ALLWARNS = -Wall -Wshadow -Wpointer-arith -Wcast-qual \ #
-Wcast-align -Wwrite-strings -Wconversion -Waggregate-return \ # darkhttpd (c) 2003, Emil Mikulic.
-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations \ #
-Wredundant-decls -Wnested-externs -Wlong-long -Winline
CFLAGS = -O -pipe -ansi -pedantic -g $(ALLWARNS) CC ?= cc
CFLAGS ?= -pipe -O2
TARGETS = bsd linux solaris
.PHONY: all $(TARGETS)
all: all:
gcc -o out $(CFLAGS) darkhttpd.c @echo "+----- ---- --- -- -"
@echo "| Please run:"
@echo "| make <target>"
@echo "| Where target is one of the following:"
@echo "| $(TARGETS)"
@echo "+----- ---- --- -- -"
splint: bsd linux:
splint -weak -skipposixheaders +posixlib +stats darkhttpd.c make darkhttpd
solaris:
make darkhttpd LIBS=-lxnet
darkhttpd: darkhttpd.c
$(CC) $(CFLAGS) $(LIBS) $< -o $@
clean:
rm -f darkhttpd core darkhttpd.core