install include files
[MKUltra.git] / defs.Darwin
blobdc4dc40fbe1fb0d635b9aba6f60286688e7b8d58
1 # -*- Mode: makefile; -*- #
3 # This file is part of MKUltra - Gene's ultimate make include files.
5 # Copyright © 2016-2017 Gene Hightower <gene@digilicious.com>
7 # This program is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, version 3.
11 # This program is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 # General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program.  See the file LICENSE.  If not, see
18 # <http://www.gnu.org/licenses/>.
20 a_ext := a
21 a_sfx := .$(a_ext)
22 a_pfx := lib
24 so_ext := dylib
25 so_sfx := .$(so_ext)
26 so_pfx := lib
28 o_ext := o
29 o_sfx := .$(o_ext)
31 exe_ext :=
32 exe_sfx :=
34 # Package manager on Darwin is <https://www.macports.org/>
35 ports := /opt/local
37 pkg_config_path := $(ports)/lib/pkgconfig
39 boost_mt := -mt
41 CXXFLAGS += \
42         -stdlib=libc++ \
43         -fPIC \
44         -I$(ports)/include
46 LDFLAGS += \
47         -stdlib=libc++ \
48         -L$(ports)/lib \
49         -framework CoreFoundation \
50         -single_module \
51         -dead_strip
53 ifneq (,$(JAVA))
54 JAVA_HOME ?= $(shell /usr/libexec/java_home)
55 jvmdir = $(JAVA_HOME)/jre/lib/server
57 CPPFLAGS += -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/darwin
58 LDFLAGS += -L$(jvmdir) -Wl,-rpath,$(jvmdir)
59 LDLIBS += -ljvm
60 endif