Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
5920e0a3
Commit
5920e0a3
authored
Nov 12, 2004
by
Mike Hibler
Browse files
more sophisticated makefile gook for differentiating Linux, FBSD4, FBSD5
parent
15ec8ff4
Changes
2
Hide whitespace changes
Inline
Side-by-side
os/frisbee.redux/GNUmakefile.in
View file @
5920e0a3
...
...
@@ -13,6 +13,17 @@ DISTFILES = TODO client.c decls.h event.c event.h log.c log.h \
network.c queue.h server.c trace.c trace.h utils.c utils.h
EXPANDCOPYRIGHT = /usr/site/lib/copyright/expand-copyr
SYSTEM := $(shell uname -s)
ifeq ($(SYSTEM),FreeBSD)
FBSDREL := $(shell uname -r | sed -e 's/\([^-][^-]*\)-.*/\1/')
# XXX 5.3 and linuxthreads don't see to get along
ifeq ($(FBSDREL),5.3)
WITH_LTHREADS = 0
else
WITH_LTHREADS = 1
endif
endif
include $(OBJDIR)/Makeconf
all: frisbee frisbeed
...
...
@@ -22,9 +33,18 @@ include $(TESTBED_SRCDIR)/GNUmakerules
FRISBEEDIR = $(OBJDIR)/os/imagezip
SHAREDOBJS = log.o network.o trace.o utils.o
PTHREADCFLAGS = -D_THREAD_SAFE \
-I/usr/local/include/pthread/linuxthreads
ifeq ($(SYSTEM),Linux)
PTHREADCFLAGS += -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_THREAD_SAFE -pthread
else
ifeq ($(WITH_LTHREADS),1)
PTHREADCFLAGS = -D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads
PTHREADLIBS = -L/usr/local/lib -llthread -llgcc_r
else
PTHREADCFLAGS = -DCONDVARS_WORK
PTHREADLIBS = -lpthread
endif
endif
CLIENTFLAGS = $(CFLAGS)
CLIENTLIBS = -lz $(PTHREADLIBS)
...
...
os/imagezip/GNUmakefile.in
View file @
5920e0a3
...
...
@@ -15,6 +15,17 @@ DISTFILES = global.h imagehdr.h queue.h sliceinfo.h \
EXPANDCOPYRIGHT = /usr/site/lib/copyright/expand-copyr
SYSTEM := $(shell uname -s)
ifeq ($(SYSTEM),FreeBSD)
FBSDREL := $(shell uname -r | sed -e 's/\([^-][^-]*\)-.*/\1/')
# XXX 5.3 and linuxthreads don't see to get along
ifeq ($(FBSDREL),5.3)
WITH_LTHREADS = 0
else
WITH_LTHREADS = 1
endif
endif
WITH_FFS = 1
WITH_EXTFS = 1
WITH_NTFS = @WINSUPPORT@
...
...
@@ -22,14 +33,18 @@ WITH_FAT = @WINSUPPORT@
include $(OBJDIR)/Makeconf
SUBDIRCFLAGS = -Wall -O2 -g
if
def LINUX
SUBDIRCFLAGS = -Wall -O2 -g
# -ansi -pedantic
if
eq ($(SYSTEM),Linux)
SUBDIRCFLAGS += -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_THREAD_SAFE -pthread
else
PTHREADCFLAGS = -D_THREAD_SAFE \
-I/usr/local/include/pthread/linuxthreads
SUBDIRCFLAGS +=
ifeq ($(WITH_LTHREADS),1)
PTHREADCFLAGS = -D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads
PTHREADLIBS = -L/usr/local/lib -llthread -llgcc_r
else
PTHREADCFLAGS = -DCONDVARS_WORK
PTHREADLIBS = -lpthread
endif
SUBDIRCFLAGS +=
endif
# Define this if you implementation of cond_vars works well
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment