Set Java hunk header for *.java files
[gigi.git] / natives / Makefile
1 JAVA_HOME=/usr/lib/jvm/default-java
2 SYSTEM= $(shell uname | awk '{print tolower($$0)}')
3 JAVAH=javah
4 CC=gcc
5 CFLAGS=-O3 -g -flto -Wall -Werror -Wextra -pedantic -fPIC
6 CFLAGS+=-I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/$(SYSTEM)
7 LDFLAGS=-shared
8
9
10 all: libsetuid.so
11
12 libsetuid.so: org_cacert_gigi_natives_SetUID.c
13         $(JAVAH) -classpath ../bin/ -jni org.cacert.gigi.natives.SetUID && \
14         $(CC) $(CFLAGS) $(LDFLAGS) -o libsetuid.so org_cacert_gigi_natives_SetUID.c
15
16 clean:
17         rm -f *.so
18         rm -f *.h