| 1 |
trond |
3 |
# BSDmakefile |
| 2 |
|
|
|
| 3 |
|
|
# $Ximalas$ |
| 4 |
|
|
|
| 5 |
|
|
BRANCH!= uname -r | awk '{split($$0, b, "-"); print tolower(b[2])}' |
| 6 |
|
|
VERSION!= uname -r | awk '{split($$0, v, "."); print v[1]}' |
| 7 |
|
|
ARCH!= uname -p |
| 8 |
|
|
|
| 9 |
|
|
BRANCH_VERSION_ARCH= ${BRANCH}-${VERSION}-${ARCH} |
| 10 |
|
|
|
| 11 |
|
|
.if ${BRANCH} == "current" |
| 12 |
|
|
BRANCH= head |
| 13 |
|
|
BRANCH_VERSION_ARCH= ${BRANCH}-${ARCH} |
| 14 |
|
|
.endif |
| 15 |
|
|
|
| 16 |
|
|
.if ${VERSION} == "8" |
| 17 |
|
|
COMPILER= clang33 |
| 18 |
|
|
.else |
| 19 |
|
|
COMPILER= clang |
| 20 |
|
|
.endif |
| 21 |
|
|
|
| 22 |
|
|
all: livstidsfanger-${BRANCH_VERSION_ARCH} |
| 23 |
|
|
|
| 24 |
|
|
CFLAGS= -Weverything -O3 -s -pthread |
| 25 |
|
|
|
| 26 |
|
|
livstidsfanger-${BRANCH_VERSION_ARCH}: livstidsfanger.c |
| 27 |
|
|
${COMPILER} ${CFLAGS} -o $@ $>$^ |
| 28 |
|
|
|
| 29 |
|
|
# EOF |