forked from sunhong/jcurses
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
25 lines (21 loc) · 1.04 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Make file for Linux 64bit OS
# Tested on Centos 6.5
CURSES=-lncurses
JAVAHOME=/usr/java/jdk1.7.0_51
JAVAC=$(JAVAHOME)/bin/javac
JAR=$(JAVAHOME)/bin/jar
JAVAH=$(JAVAHOME)/bin/javah
JAVA=$(JAVAHOME)/bin/java
JAVADOC=$(JAVAHOME)/bin/javadoc
GCC=gcc
GCCFLAGS=-fPIC -Wall -shared -I$(JAVAHOME)/include -I$(JAVAHOME)/include/linux
CLASSPATH=./classes
default: jar native docs
java: ;$(JAVAC) -classpath $(CLASSPATH) -d ./classes `find ./src/jcurses -name *.java`
docs: ;$(JAVADOC) -classpath $(CLASSPATH) -sourcepath ./src -d ./doc jcurses.event jcurses.system jcurses.util jcurses.widgets
native: java include
include: java;$(JAVAH) -classpath $(CLASSPATH) -d ./src/native/include jcurses.system.Toolkit
clean: ;rm -rf ./classes/jcurses ./lib/libjcurses64.so ./lib/jcurses.jar ./src/native/include/*.h
native:java include;$(GCC) $(GCCFLAGS) -o lib/libjcurses64.so $(CURSES) src/native/Toolkit.c
jar: java;cd classes/ && $(JAR) -cvf ../lib/jcurses.jar *
test: ;$(JAVA) -classpath ./lib/jcurses.jar -Djcurses.protocol.filename=jcurses.log jcurses.tests.Test