~ubuntu-branches/ubuntu/oneiric/tuxguitar/oneiric

« back to all changes in this revision

Viewing changes to TuxGuitar-compat/GNUmakefile

  • Committer: Bazaar Package Importer
  • Author(s): Philippe Coval
  • Date: 2008-06-19 00:30:30 UTC
  • mto: (5.1.2 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20080619003030-h719szrhsngou7c6
Tags: upstream-1.0
ImportĀ upstreamĀ versionĀ 1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /usr/bin/make -f
 
2
# -*- makefile -*-
 
3
#ident "$Id: GNUmakefile,v 1.4 2008/02/26 15:25:26 akdmia Exp $"
 
4
#@author: created by www.philippe.coval.online.fr -- revision: $Author: akdmia $
 
5
#licence: LGPL
 
6
#------------------------------------------------------------------------------
 
7
PACKAGE?=tuxguitar-compat
 
8
LIBRARY?=lib${PACKAGE}.so
 
9
LIBRARY_PROVIDER?=org.herac.tuxguitar.io.tg.TGPluginListImpl
 
10
 
 
11
PREFIX?=/usr
 
12
 
 
13
# dependencies
 
14
SWT_PATH?=/usr/share/java/swt.jar
 
15
 
 
16
# tuxguitar paths
 
17
TG_SERVICE_CLASS?=org.herac.tuxguitar.gui.system.plugins.TGPlugin
 
18
TG_PREFIX?=${PREFIX}
 
19
TG_SOURCE_PATH?=${TG_PREFIX}/src
 
20
TG_LIBRARY_PATH?=${TG_PREFIX}/lib
 
21
TG_NATIVE_PLUGINS_PATH?=${TG_PREFIX}/share/tuxguitar/plugins
 
22
 
 
23
# install paths
 
24
INSTALL_LIBRARY_DIR?=${TG_NATIVE_PLUGINS_PATH}
 
25
INSTALL_SERVICE_DIR?=${TG_NATIVE_PLUGINS_PATH}/${PACKAGE}/META-INF/services
 
26
 
 
27
# build paths
 
28
SOURCE_PATH?=./src/
 
29
SOURCES?=$(shell find ${SOURCE_PATH} -name "*.java")
 
30
OBJECTS?=${SOURCES:%.java=%.o}
 
31
 
 
32
GCJ?=gcj
 
33
GCJFLAGS+=-fjni -I${SOURCE_PATH} -I${TG_SOURCE_PATH} -I${SWT_PATH}
 
34
 
 
35
default: all
 
36
 
 
37
all: objects library meta-inf
 
38
 
 
39
objects: tmp.classes.tmp
 
40
 
 
41
tmp.classes.tmp: ${OBJECTS}
 
42
        @touch $@
 
43
 
 
44
library: ${LIBRARY}
 
45
 
 
46
install:
 
47
        -install -d ${DESTDIR}${PREFIX}/
 
48
        -install -d ${DESTDIR}${INSTALL_LIBRARY_DIR}/
 
49
        -install -d ${DESTDIR}${INSTALL_SERVICE_DIR}/
 
50
        -install ${LIBRARY} ${DESTDIR}${INSTALL_LIBRARY_DIR}/${LIBRARY}
 
51
        -install ${TG_SERVICE_CLASS} ${DESTDIR}${INSTALL_SERVICE_DIR}/${TG_SERVICE_CLASS}
 
52
 
 
53
uninstall:
 
54
        -rm ${DESTDIR}${INSTALL_LIBRARY_DIR}/${LIBRARY}
 
55
        -rm ${DESTDIR}${INSTALL_SERVICE_DIR}/${TG_SERVICE_CLASS}
 
56
 
 
57
clean:
 
58
        -@find . -name "*.o" -exec rm -f {} \; > /dev/null 2>&1
 
59
        -@find . -name "*.so" -exec rm -f {} \; > /dev/null 2>&1
 
60
        -@find . -name "*.tmp" -exec rm -f {} \; > /dev/null 2>&1
 
61
        -@rm ${TG_SERVICE_CLASS}
 
62
 
 
63
%.o: %.java
 
64
        ${GCJ} ${GCJFLAGS} -c -o $@ $<
 
65
 
 
66
%.so: ${OBJECTS}
 
67
        ${GCJ} -shared -o $@ -ltuxguitar -L${TG_LIBRARY_PATH} $^
 
68
 
 
69
meta-inf:
 
70
        echo ${LIBRARY_PROVIDER} > ${TG_SERVICE_CLASS}
 
71
 
 
72
#eof "$Id: GNUmakefile,v 1.4 2008/02/26 15:25:26 akdmia Exp $"
 
 
b'\\ No newline at end of file'