]> err.no Git - sope/blob - gnustep-make/jni.make
Drop apache 1 build-dependency
[sope] / gnustep-make / jni.make
1 #
2 #   jni.make
3 #
4 #   Makefile to include to compile JNI code.
5 #
6 #   Copyright (C) 2000 Free Software Foundation, Inc.
7 #
8 #   Author:  Nicola Pero <nicola@brainstorm.co.uk> 
9 #
10 #   This file is part of the GNUstep Makefile Package.
11 #
12 #   This library is free software; you can redistribute it and/or
13 #   modify it under the terms of the GNU General Public License
14 #   as published by the Free Software Foundation; either version 2
15 #   of the License, or (at your option) any later version.
16 #   
17 #   You should have received a copy of the GNU General Public
18 #   License along with this library; see the file COPYING.LIB.
19 #   If not, write to the Free Software Foundation,
20 #   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21
22 #
23 # Include this file if you need to compile JNI code. 
24 # This files simply adds automatically the compiler flags to find the
25 # jni headers.
26 #
27
28 # prevent multiple inclusions
29 ifeq ($(JNI_MAKE_LOADED),)
30 JNI_MAKE_LOADED=yes
31
32 # Default
33 JAVA_OS = linux
34
35 # MacOS-X
36 ifeq ($(findstring darwin, $(GNUSTEP_TARGET_OS)), darwin)
37   JAVA_OS = darwin
38 #  JNI_INCLUDE_HEADERS = -I/System/Library/Frameworks/JavaVM.framework/Versions/1.3.1/Headers
39   JNI_INCLUDE_HEADERS = -I/System/Library/Frameworks/JavaVM.framework/Headers
40
41 else
42
43 # Solaris
44 ifeq ($(findstring solaris, $(GNUSTEP_TARGET_OS)), solaris)
45   JAVA_OS = solaris
46 endif
47
48 # Windows
49 ifeq ($(findstring mingw32, $(GNUSTEP_TARGET_OS)), mingw32)
50   JAVA_OS = win32
51 endif
52
53 # Add more platforms here
54
55 #
56 # This should be where your jni.h and jni_md.h are located.
57 #
58 JNI_INCLUDE_HEADERS = -I$(JAVA_HOME)/include/ \
59                       -I$(JAVA_HOME)/include/$(JAVA_OS) 
60 endif
61
62 ADDITIONAL_INCLUDE_DIRS += $(JNI_INCLUDE_HEADERS)
63
64 endif # jni.make loaded