2001-04-10 11:29:32 -04:00
|
|
|
|
|
|
|
TARGET = libjavacurl.so
|
|
|
|
|
|
|
|
OBJS = javacurl.o
|
|
|
|
|
|
|
|
CC = gcc
|
|
|
|
CFLAGS = -c
|
|
|
|
CPPFLAGS = -I/usr/j2se/include -I/usr/local/include -I/usr/j2se/include/solaris
|
2001-04-11 06:03:14 -04:00
|
|
|
|
|
|
|
# Linux might use -shared -Wl,-soname,libnative.so instead of -G
|
|
|
|
LDFLAGS = -G -lcurl -ldl -L/usr/local/ssl/lib -lssl -lcrypto
|
2001-04-10 11:29:32 -04:00
|
|
|
|
|
|
|
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)
|
2001-04-11 06:03:14 -04:00
|
|
|
$(CC) -o $(TARGET) $(LDFLAGS) $(OBJS)
|
2001-04-10 11:29:32 -04:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f javacurl.o CurlGlue.h CurlGlue.class
|