-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (25 loc) · 951 Bytes
/
Makefile
File metadata and controls
28 lines (25 loc) · 951 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
# Note: make apparently thinks, that options specified with "/" are absolute paths and resolves them. see also https://stackoverflow.com/questions/17012419/d9024-make-unrecognized-source-file-type
ARCH ?= x64
WIN_SDK_VERSION ?= 10.0.22621.0
MSVC_VERSION ?= 14.41.34120
HEADERS := -I"src\main\headers" \
-I"${JAVA_HOME}\include" \
-I"${JAVA_HOME}\include\win32" \
-I"C:\Program Files (x86)\Windows Kits\10\Include\$(WIN_SDK_VERSION)\cppwinrt"
SOURCES := $(wildcard src/main/native/*.cpp)
OUT_DIR := target/$(ARCH)
OUT_DLL := src/main/resources/integrations-$(ARCH).dll
OUT_LIB := $(OUT_DIR)/integrations.lib
########
all: install
install:
ifeq "$(wildcard $(OUT_DIR))" ""
mkdir "$(OUT_DIR)"
endif
cl -EHsc -std:c++17 -LD -W4 -guard:cf \
-Fe"$(OUT_DLL)" \
-Fo"$(OUT_DIR)/" \
$(HEADERS) $(SOURCES) \
-link -NXCOMPAT -DYNAMICBASE \
-implib:$(OUT_LIB) \
crypt32.lib shell32.lib ole32.lib uuid.lib user32.lib Advapi32.lib windowsapp.lib