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
+5 -4
View File
@@ -440,13 +440,14 @@ endif
endif endif
ifdef WANT_LIBNH ifdef WANT_LIBNH
$(TARGETPFX)libnh.a: $(HOBJ) $(LIBNHSYSOBJ) ../lib/lua/liblua.a $(TARGETPFX)libnh.a: $(HOBJ) $(LIBNHSYSOBJ) ../lib/lua/liblua-$(LUA_VERSION).a
$(AR) rcs $@ $(HOBJ) $(LIBNHSYSOBJ) ../lib/lua/liblua.a $(AR) rcs $@ $(HOBJ) $(LIBNHSYSOBJ) ../lib/lua/liblua-$(LUA_VERSION).a
@echo "$@ built." @echo "$@ built."
$(TARGETPFX)libnhmain.o : ../sys/libnh/libnhmain.c $(HACK_H) $(TARGETPFX)libnhmain.o : ../sys/libnh/libnhmain.c $(HACK_H)
$(CC) $(CFLAGS) -c -o$@ $< $(CC) $(CFLAGS) -c -o$@ $<
$(TARGETPFX)winshim.o : ../win/shim/winshim.c $(HACK_H) #dependency tool added this to Makefile.src
$(CC) $(CFLAGS) -c -o$@ $< #$(TARGETPFX)winshim.o : ../win/shim/winshim.c $(HACK_H)
# $(CC) $(CFLAGS) -c -o$@ $<
endif # WANT_LIBNH endif # WANT_LIBNH
# #
+5 -4
View File
@@ -545,13 +545,14 @@ endif
endif endif
ifdef WANT_LIBNH ifdef WANT_LIBNH
$(TARGETPFX)libnh.a: $(HOBJ) $(LIBNHSYSOBJ) ../lib/lua/liblua.a $(TARGETPFX)libnh.a: $(HOBJ) $(LIBNHSYSOBJ) ../lib/lua/liblua-$(LUA_VERSION).a
$(AR) rcs $@ $(HOBJ) $(LIBNHSYSOBJ) ../lib/lua/liblua.a $(AR) rcs $@ $(HOBJ) $(LIBNHSYSOBJ) ../lib/lua/liblua-$(LUA_VERSION).a
@echo "$@ built." @echo "$@ built."
$(TARGETPFX)libnhmain.o : ../sys/libnh/libnhmain.c $(HACK_H) $(TARGETPFX)libnhmain.o : ../sys/libnh/libnhmain.c $(HACK_H)
$(CC) $(CFLAGS) -c -o$@ $< $(CC) $(CFLAGS) -c -o$@ $<
$(TARGETPFX)winshim.o : ../win/shim/winshim.c $(HACK_H) # dependency tool added this to Makefile.src
$(CC) $(CFLAGS) -c -o$@ $< #$(TARGETPFX)winshim.o : ../win/shim/winshim.c $(HACK_H)
# $(CC) $(CFLAGS) -c -o$@ $<
endif # WANT_LIBNH endif # WANT_LIBNH
ifdef MAKEFILE_DOC ifdef MAKEFILE_DOC
+5 -5
View File
@@ -171,7 +171,6 @@ VDECLCB(shim_status_update,
(int fldidx, genericptr_t ptr, int chg, int percent, int color, unsigned long *colormasks), (int fldidx, genericptr_t ptr, int chg, int percent, int color, unsigned long *colormasks),
"vipiiip", "vipiiip",
A2P fldidx, P2V ptr, A2P chg, A2P percent, A2P color, P2V colormasks) A2P fldidx, P2V ptr, A2P chg, A2P percent, A2P color, P2V colormasks)
#ifdef __EMSCRIPTEN__ #ifdef __EMSCRIPTEN__
/* XXX: calling display_inventory() from shim_update_inventory() causes reentrancy that breaks emscripten Asyncify */ /* 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() */ /* 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( shim_ctrl_nhwindow(
winid window UNUSED, winid window UNUSED,
int request UNUSED, int request UNUSED,
win_request_info *wri UNUSED) { win_request_info *wri) {
return (win_request_info *) 0; return (win_request_info *) 0;
} }
#else /* !__EMSCRIPTEN__ */ #else /* !__EMSCRIPTEN__ */
VDECLCB(shim_update_inventory,(int a1 UNUSED) VDECLCB(shim_player_selection, (void), "v")
DECLB(win_request_info *, shim_ctrl_nhwindow, 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), (winid window, int request, win_request_info *wri),
"viip", "viip",
A2P window UNUSED, A2P request UNUSED, P2V wri UNUSED) A2P window, A2P request, P2V wri)
#endif #endif
/* Interface definition used in windows.c */ /* Interface definition used in windows.c */