-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (23 loc) · 692 Bytes
/
Makefile
File metadata and controls
28 lines (23 loc) · 692 Bytes
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
CC=gcc
JAVA = java-8-openjdk-amd64
NATIVE = src/main/resources/native
INCLUDES = -IC:/PROGRA~1/Java/jdk1.8.0_144/include\
-IC:/PROGRA~1/Java/jdk1.8.0_144/include/win32\
-Itarget/native/include\
-I/usr/local/include
CFLAGS = -Ofast -Wall -fPIC $(INCLUDES)
LDFLAGS = -Wl,-soname,libjni_ghook.dll,-rpath='$$ORIGIN' -shared
LDPATH = -L$(NATIVE)
LIBS = -lcomctl32
SOURCES = src/main/native/ghook_GlobalHook.c
TARGETLIB = libjni_ghook.dll
all: libjni_ghook.dll
clean:
rm -f *.o *~ $(TARGETLIB)
$(TARGETLIB) : $(SOURCES:.c=.o)
$(CC) $(LDFLAGS) $(LDPATH) -o $@ $^ $(LIBS)
install: $(TARGETLIB)
mv $(TARGETLIB) $(NATIVE)
rm src/main/native/*.o
.c.o:
$(CC) -c $(CFLAGS) $< -o $@