blob: e05ea600421650741a0969f774363099deb28539 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
TARGET = libjavacurl.so
OBJS = javacurl.o
CC = gcc
CFLAGS = -c
CPPFLAGS = -I/usr/j2se/include -I/usr/local/include -I/usr/j2se/include/solaris
LDFLAGS = -lcurl -ldl -L/usr/local/ssl/lib -lssl -lcrypto
all: CurlGlue.h CurlGlue.class javacurl.o $(TARGET) test.class
test:
java test
javacurl.o: javacurl.c CurlGlue.h
$(CC) $(CPPFLAGS) $(CFLAGS) $<
CurlGlue.h: CurlGlue.java CurlGlue.class
javah CurlGlue
touch CurlGlue.h
test.class: CurlGlue.class javacurl.o
javac test.java
CurlGlue.class: CurlGlue.java
javac $<
$(TARGET): $(OBJS)
$(CC) -G -o $(TARGET) $(LDFLAGS) $(OBJS)
clean:
rm -f javacurl.o CurlGlue.h CurlGlue.class
|