1
# Copyright (c) 2014 Jared González
3
# Permission is hereby granted, free of charge, to any
4
# person obtaining a copy of this software and associated
5
# documentation files (the "Software"), to deal in the
6
# Software without restriction, including without limitation
7
# the rights to use, copy, modify, merge, publish,
8
# distribute, sublicense, and/or sell copies of the
9
# Software, and to permit persons to whom the Software is
10
# furnished to do so, subject to the following conditions:
12
# The above copyright notice and this permission notice
13
# shall be included in all copies or substantial portions of
16
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
17
# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
18
# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
19
# PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
20
# OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
21
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
22
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25
# CONFIGURACION DEL COMPILADOR
26
# Se define el compilador gcc
28
# Se configuran las banderas y opciones de compilación
29
# de forma predeterminada se compila en Release
33
CFLAGS=-O3 -Wall -DNDEBUG
36
# CONFIGURACION DE JAVA
37
# Obtener arquitectura de compilación
38
ARCH=$(shell getconf LONG_BIT)
44
# Obtener versión Java de compilación
46
JAVA_HOME=/usr/lib/jvm/java-7-openjdk-${JAVA_ARCH}
48
# Eliminar la variable de ambiente JAVA_TOOL_OPTIONS
49
unexport JAVA_TOOL_OPTIONS
51
# ESTABLECER VARIABLES DE COMPILACION DE JAYATANA
52
# se definen banderas de compilacion
53
JAYATANA_CFLAGS=-I. -I${JAVA_HOME}/include -I${JAVA_HOME}/include/linux \
54
$(shell pkg-config --cflags glib-2.0 gio-2.0 dbusmenu-glib-0.4 xt) \
55
-L${JAVA_HOME}/jre/lib/${JAVA_ARCH} -L${JAVA_HOME}/jre/lib/${JAVA_ARCH}/xawt
56
# se definen librerias
57
JAYATANA_LIBS=$(shell pkg-config --libs glib-2.0 gio-2.0 dbusmenu-glib-0.4 xt) \
63
libjayatana.so: com_jarego_jayatana_basic_GMainLoop.o com_jarego_jayatana_basic_GlobalMenu.o \
64
com_jarego_jayatana_jni.o com_jarego_jayatana_collections.o com_jarego_jayatana_jkey2xkey.o
65
${CC} ${CFLAGS} ${JAYATANA_CFLAGS} -shared -o $@ $+ ${JAYATANA_LIBS}
68
${CC} ${CFLAGS} ${JAYATANA_CFLAGS} -fPIC -c -o $@ $< ${JAYATANA_LIBS}
71
${JAVA_HOME}/bin/javah -classpath ../jayatana/target/classes \
72
com.jarego.jayatana.basic.GMainLoop
73
${JAVA_HOME}/bin/javah -classpath ../jayatana/target/classes \
74
com.jarego.jayatana.basic.GlobalMenu