Commit 8bc3a3c3 authored by Mike Hibler's avatar Mike Hibler
Browse files

Hack to make NTFS build work under FreeBSD 5 and Linux.

The options (HAVE_* enviornment settings) have been there for awhile,
I just found a way to set an environment variable from the makefile.
parent 426cc9e9
......@@ -16,14 +16,39 @@ DISTFILES = global.h imagehdr.h queue.h sliceinfo.h \
EXPANDCOPYRIGHT = /usr/site/lib/copyright/expand-copyr
SYSTEM := $(shell uname -s)
# FreeBSD specific goop
ifeq ($(SYSTEM),FreeBSD)
FBSDREL := $(shell uname -r | sed -e 's/\([^-][^-]*\)-.*/\1/')
FBSDMAJ := $(basename $(FBSDREL))
# FreeBSD 5 has GCC3 and LOCALE
# XXX this should be done with configure
ifeq ($(FBSDMAJ),5)
export HAVE_GCC3 = 1
export HAVE_LOCALE = 1
endif
# XXX 5.3 and linuxthreads don't see to get along
ifeq ($(FBSDREL),5.3)
WITH_LTHREADS = 0
else
WITH_LTHREADS = 1
endif
# XXX special checkpoint/shadow device support
WITH_SHD = 0
endif
# Linux specific goop
ifeq ($(SYSTEM),Linux)
# XXX this should be done with configure
export LINUX = 1
export HAVE_GCC3 = 1
export HAVE_LOCALE = 1
endif
WITH_FFS = 1
......@@ -31,9 +56,6 @@ WITH_EXTFS = 1
WITH_NTFS = @WINSUPPORT@
WITH_FAT = @WINSUPPORT@
# XXX special checkpoint/shadow device support
WITH_SHD = 0
include $(OBJDIR)/Makeconf
SUBDIRCFLAGS = -Wall -O2 -g # -ansi -pedantic
......@@ -105,6 +127,13 @@ endif
all: $(SUBDIRS) imagezip imageunzip imagedump imagehash
whoami:
@echo "SYSTEM is $(SYSTEM)"
ifeq ($(SYSTEM),FreeBSD)
@echo "FBSDREL is $(FBSDREL)"
@echo "FBSDMAJ is $(FBSDMAJ)"
endif
include $(TESTBED_SRCDIR)/GNUmakerules
imagezip: imagezip.o version.o $(FSLIBS)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment