o Makefile BSDfication.

PR:		misc/147461 (with my changes)
Submitted by:	Erik Cederstrand
This commit is contained in:
Maxim Konovalov 2010-06-04 08:19:43 +00:00
parent 1accefb1e1
commit 22fdc015e2

View File

@ -1,31 +1,25 @@
# $FreeBSD$
OSTYPE=$(shell uname)
PROG= fstest
NO_MAN=
ifeq "${OSTYPE}" "FreeBSD"
CFLAGS += -D__OS_FreeBSD__
CFLAGS += -DHAS_LCHMOD -DHAS_CHFLAGS -DHAS_LCHFLAGS -DHAS_FREEBSD_ACL
endif
OSTYPE!= uname
ifeq "${OSTYPE}" "SunOS"
CFLAGS += -D__OS_Solaris__
CFLAGS += -DHAS_TRUNCATE64 -DHAS_STAT64
endif
.if ${OSTYPE} == "FreeBSD"
CFLAGS+= -D__OS_FreeBSD__
CFLAGS+= -DHAS_LCHMOD -DHAS_CHFLAGS -DHAS_LCHFLAGS -DHAS_FREEBSD_ACL
ifeq "${OSTYPE}" "Darwin"
CFLAGS += -D__OS_Darwin__
CFLAGS += -DHAS_LCHMOD -DHAS_CHFLAGS -DHAS_LCHFLAGS
endif
.elif ${OSTYPE} == "SunOS"
CFLAGS+= -D__OS_Solaris__
CFLAGS+= -DHAS_TRUNCATE64 -DHAS_STAT64
ifeq "${OSTYPE}" "Linux"
CFLAGS += -D__OS_Linux__
CFLAGS += -D_GNU_SOURCE
endif
.elif ${OSTYPE} == "Darwin"
CFLAGS+= -D__OS_Darwin__
CFLAGS+= -DHAS_LCHMOD -DHAS_CHFLAGS -DHAS_LCHFLAGS
all: fstest
.elif ${OSTYPE} == "Linux"
CFLAGS+= -D__OS_Linux__
CFLAGS+= -D_GNU_SOURCE
.endif
fstest: fstest.c
gcc -Wall ${CFLAGS} fstest.c -o fstest
clean:
rm -f fstest
.include <bsd.prog.mk>