Skip to content

Commit 2113f71

Browse files
committed
Build a stub callback.c
1 parent 2a84418 commit 2113f71

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

native/Makefile

+18-4
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,12 @@ JAVA_INCLUDES=-I"$(JAVA_HOME)/include" \
5959
BUILD=../build/native
6060
JAVAH=$(BUILD)
6161
INSTALLDIR=../build/$(OS)
62-
JNIDISPATCH_OBJS=$(BUILD)/dispatch.o $(BUILD)/callback.o $(EXTRAOBJS)
62+
##fixme!!
63+
JNIDISPATCH_OBJS=$(BUILD)/dispatch.o $(EXTRAOBJS)
64+
#JNIDISPATCH_OBJS=$(BUILD)/dispatch.o $(BUILD)/callback.o $(EXTRAOBJS)
6365
RSRC=$(BUILD)/rsrc.o
6466
DLLCB=$(BUILD)/dll-callback.o
67+
FAUXCB=$(BUILD)/callback.o
6568
ifneq ($(DYNAMIC_LIBFFI),true)
6669
FFI_SRC=$(shell pwd)/libffi
6770
FFI_BUILD=$(BUILD)/libffi
@@ -228,7 +231,9 @@ FFI_CONFIG+=--host=i686-w64-mingw32
228231
MINGW_PREFIX?=i686-w64-mingw32-
229232
endif
230233
# Need windres from mingw distribution, even if building with MSVC
231-
WINDRES=$(MINGW_PREFIX)windres
234+
#### disable windres for arm64
235+
#WINDRES=$(MINGW_PREFIX)windres
236+
WINDRES=false
232237
MINGW=$(MINGW_PREFIX)gcc
233238

234239
ifeq ($(USE_MSVC),true)
@@ -246,11 +251,16 @@ LIBS=psapi.lib
246251
ARSFX=.lib
247252
ifeq ($(ARCH),amd64)
248253
#fixme!!!!
254+
#CC+= =m64
249255
CC+= -marm64
250256
endif
251-
FFI_CONFIG+= && rm -f include/ffitarget.h && cp $(FFI_SRC)/include/*.h $(FFI_SRC)/src/x86/ffitarget.h include
257+
#fixme!!!!
258+
FFI_CONFIG+=--host=aarch64-cygwin
259+
#FFI_CONFIG+= && rm -f include/ffitarget.h && cp $(FFI_SRC)/include/*.h $(FFI_SRC)/src/x86/ffitarget.h include
260+
FFI_CONFIG+= && rm -f include/ffitarget.h && cp $(FFI_SRC)/include/*.h $(FFI_SRC)/src/aarch64/ffitarget.h include
252261
FFI_ENV+=LD="$(LD)" CPP="$(CPP)" CXXCPP="$(CPP)"
253-
EXTRAOBJS+=$(DLLCB)
262+
#fixme!!
263+
EXTRAOBJS+=$(FAUXCB)
254264

255265
else
256266
# Mingw compiler
@@ -450,9 +460,13 @@ install:
450460
mkdir $(INSTALLDIR)
451461
cp $(LIBRARY) $(INSTALLDIR)
452462

463+
# fixme!!
453464
ifeq ($(ARCH), amd64)
454465
$(DLLCB): dll-callback.c
455466
$(MINGW) -DDEFINE_CALLBACKS -c $< $(COUT)
467+
$(FAUXCB): callback.c
468+
# TODO: Fix: Lazily and incorrectly set WINCE flag to avoid dll-callback support
469+
$(CC) -DDEFINE_CALLBACKS -D_WIN32_WCE $(CINCLUDES) -c $< $(COUT)
456470
endif
457471

458472
$(RSRC): $(BUILD)/jnidispatch.rc $(BUILD)/$(JNA_JNI_VERSION).stamp

0 commit comments

Comments
 (0)