Merge pull request #2303 from jwillemsen/jwi-803
[ACE_TAO.git] / ACE / include / makeinclude / platform_freebsd.GNU
blob402f7d9a8dcdfb755a64b78072183dc85eea691e
1 # -*- Makefile -*-
3 # platform_freebsd.GNU
5 ##  See /usr/ports/Mk/bsd.port.mk for sample usage of the OSVERSION
6 ##  variable, especially with respect to defining the correct compiler
7 ##  flags for threads.
8 OSVERSION := $(shell sysctl -n kern.osreldate)
9 OSMAJOR := $(firstword $(subst ., ,$(shell sysctl -n kern.osrelease)))
11 debug ?= 1
12 optimize ?= 1
13 threads ?= 1
14 versioned_so ?= 1
16 ifneq ($(filter 10 11,$(OSMAJOR)),)
17   CC            ?= clang
18   CXX           ?= clang++
19   CCFLAGS       += -fdelayed-template-parsing
20 else
21   CC            ?= gcc
22   CXX           ?= g++
23 endif
25 AR              = ar
26 ARFLAGS         = ruv
27 CPPFLAGS        += -I/usr/local/include
28 DCFLAGS         += -g
29 DCCFLAGS        += $(DCFLAGS)
30 DLD             = $(CXX)
31 LD              = $(CXX)
32 LDFLAGS         += -L/usr/local/lib
33 OCFLAGS         += -O2
34 OCCFLAGS        = $(OCFLAGS)
35 PIC             = -fpic
36 PRELIB          = @true
37 RANLIB          = ranlib
38 SOFLAGS         += -shared
40 ifeq ($(threads),1)
41   FLAGS_C_CC += -pthread
42   SOFLAGS += -pthread
43 endif # threads
45 PLATFORM_X11_CPPFLAGS = -I/usr/X11R6/include
46 PLATFORM_X11_LIBS = -lX11
47 PLATFORM_X11_LDFLAGS = -L/usr/X11R6/lib
49 PLATFORM_XT_CPPFLAGS =
50 PLATFORM_XT_LIBS = -lXt
51 PLATFORM_XT_LDFLAGS =
53 PLATFORM_FL_CPPFLAGS =
54 PLATFORM_FL_LIBS = -lfltk -lfltk_forms -lfltk_gl
55 PLATFORM_FL_LDFLAGS =
57 PLATFORM_GL_CPPFLAGS = -I/usr/X11R6/include
58 PLATFORM_GL_LIBS = -lGL
59 PLATFORM_GL_LDFLAGS = -L/usr/X11R6/lib
61 PLATFORM_GTK_CPPFLAGS = $(shell gtk-config --cflags)
62 PLATFORM_GTK_LIBS = $(shell gtk-config --libs)
63 PLATFORM_GTK_LDFLAGS =
65 PLATFORM_FOX_CPPFLAGS ?= -I/usr/local/include/fox-1.6
66 PLATFORM_FOX_LIBS ?= -lFOX-1.6
67 PLATFORM_FOX_LDFLAGS ?=
69 PLATFORM_TK_CPPFLAGS=$(shell . /usr/local/lib/tk8.*/tkConfig.sh && echo -n $$TK_INCLUDE_SPEC)
70 PLATFORM_TK_LIBS=$(shell . /usr/local/lib/tk8.*/tkConfig.sh && echo -n $$TK_LIB_FLAG)
71 PLATFORM_TK_LDFLAGS=
73 PLATFORM_TCL_CPPFLAGS=$(shell . /usr/local/lib/tcl8.*/tclConfig.sh && echo -n $$TCL_INCLUDE_SPEC)
74 PLATFORM_TCL_LIBS=$(shell . /usr/local/lib/tcl8.*/tclConfig.sh && echo -n $$TCL_LIB_FLAG)
75 PLATFORM_TCL_LDFLAGS=
77 # Test for template instantiation, add to versioned_so if versioned_so set,
78 # add -E to LDFLAGS if using GNU ld
80 include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU