libnh build

The macOS.370 has not yet been tested, but it is patterned after
the linux.370 changes.
This commit is contained in:
nhmall
2025-05-12 08:45:26 -04:00
parent c90cc53ab3
commit 8ac31b24f6
3 changed files with 15 additions and 13 deletions

View File

@@ -440,13 +440,14 @@ endif
endif
ifdef WANT_LIBNH
$(TARGETPFX)libnh.a: $(HOBJ) $(LIBNHSYSOBJ) ../lib/lua/liblua.a
$(AR) rcs $@ $(HOBJ) $(LIBNHSYSOBJ) ../lib/lua/liblua.a
$(TARGETPFX)libnh.a: $(HOBJ) $(LIBNHSYSOBJ) ../lib/lua/liblua-$(LUA_VERSION).a
$(AR) rcs $@ $(HOBJ) $(LIBNHSYSOBJ) ../lib/lua/liblua-$(LUA_VERSION).a
@echo "$@ built."
$(TARGETPFX)libnhmain.o : ../sys/libnh/libnhmain.c $(HACK_H)
$(CC) $(CFLAGS) -c -o$@ $<
$(TARGETPFX)winshim.o : ../win/shim/winshim.c $(HACK_H)
$(CC) $(CFLAGS) -c -o$@ $<
#dependency tool added this to Makefile.src
#$(TARGETPFX)winshim.o : ../win/shim/winshim.c $(HACK_H)
# $(CC) $(CFLAGS) -c -o$@ $<
endif # WANT_LIBNH
#

View File

@@ -545,13 +545,14 @@ endif
endif
ifdef WANT_LIBNH
$(TARGETPFX)libnh.a: $(HOBJ) $(LIBNHSYSOBJ) ../lib/lua/liblua.a
$(AR) rcs $@ $(HOBJ) $(LIBNHSYSOBJ) ../lib/lua/liblua.a
$(TARGETPFX)libnh.a: $(HOBJ) $(LIBNHSYSOBJ) ../lib/lua/liblua-$(LUA_VERSION).a
$(AR) rcs $@ $(HOBJ) $(LIBNHSYSOBJ) ../lib/lua/liblua-$(LUA_VERSION).a
@echo "$@ built."
$(TARGETPFX)libnhmain.o : ../sys/libnh/libnhmain.c $(HACK_H)
$(CC) $(CFLAGS) -c -o$@ $<
$(TARGETPFX)winshim.o : ../win/shim/winshim.c $(HACK_H)
$(CC) $(CFLAGS) -c -o$@ $<
# dependency tool added this to Makefile.src
#$(TARGETPFX)winshim.o : ../win/shim/winshim.c $(HACK_H)
# $(CC) $(CFLAGS) -c -o$@ $<
endif # WANT_LIBNH
ifdef MAKEFILE_DOC

View File

@@ -171,7 +171,6 @@ VDECLCB(shim_status_update,
(int fldidx, genericptr_t ptr, int chg, int percent, int color, unsigned long *colormasks),
"vipiiip",
A2P fldidx, P2V ptr, A2P chg, A2P percent, A2P color, P2V colormasks)
#ifdef __EMSCRIPTEN__
/* XXX: calling display_inventory() from shim_update_inventory() causes reentrancy that breaks emscripten Asyncify */
/* this should be fine since according to windows.doc, the only purpose of shim_update_inventory() is to call display_inventory() */
@@ -192,15 +191,16 @@ win_request_info *
shim_ctrl_nhwindow(
winid window UNUSED,
int request UNUSED,
win_request_info *wri UNUSED) {
win_request_info *wri) {
return (win_request_info *) 0;
}
#else /* !__EMSCRIPTEN__ */
VDECLCB(shim_update_inventory,(int a1 UNUSED)
DECLB(win_request_info *, shim_ctrl_nhwindow,
VDECLCB(shim_player_selection, (void), "v")
VDECLCB(shim_update_inventory,(int a1 UNUSED), "vi", A2P a1)
DECLCB(win_request_info *, shim_ctrl_nhwindow,
(winid window, int request, win_request_info *wri),
"viip",
A2P window UNUSED, A2P request UNUSED, P2V wri UNUSED)
A2P window, A2P request, P2V wri)
#endif
/* Interface definition used in windows.c */