MSYS2 build fixes

This commit is contained in:
nhmall
2025-06-02 08:50:10 -04:00
parent a0da9168b7
commit afafc69eed
2 changed files with 8 additions and 1 deletions

View File

@@ -325,9 +325,11 @@ CFLAGS = -mms-bitfields -I../include -I../sys/windows
LDFLAGS = LDFLAGS =
ifeq "$(DEBUGINFO)" "Y" ifeq "$(DEBUGINFO)" "Y"
CFLAGS += -g -D_DEBUG CFLAGS += -g -D_DEBUG
LIBUCRT = -lucrtbased
else else
CFLAGS += -DNDEBUG CFLAGS += -DNDEBUG
LDFLAGS += -s LDFLAGS += -s
LIBUCRT=
endif endif
ifeq "$(USE_DLB)" "Y" ifeq "$(USE_DLB)" "Y"
@@ -362,7 +364,8 @@ CONSOLEDEF = $(COMMONDEF) -D_CONSOLE
# To build util targets # To build util targets
CFLAGSU = $(CFLAGS) $(CONSOLEDEF) $(DLBFLG) CFLAGSU = $(CFLAGS) $(CONSOLEDEF) $(DLBFLG)
LIBS = -lcomctl32 -lgdi32 -lole32 -lshell32 -luserenv -luuid -lwinmm -lbcrypt LIBS = -lcomctl32 -lgdi32 -lole32 -lshell32 -luserenv -luuid -lwinmm \
-lrpcrt4 -lbcrypt $(LIBUCRT)
$(GAMEDIR): $(GAMEDIR):
@mkdir -p $@ @mkdir -p $@
@@ -536,6 +539,7 @@ $(GAMEDIR)/recover.exe: $(ROBJS) $(HLHACKLIB) | $(GAMEDIR)
$(OR)/recover.o: $(U)recover.c | $(OR) $(OR)/recover.o: $(U)recover.c | $(OR)
$(cc) $(CFLAGSU) $< -o$@ $(cc) $(CFLAGSU) $< -o$@
$(OR)/rversion.o: $(SRC)/version.c | $(OR) $(OR)/rversion.o: $(SRC)/version.c | $(OR)
$(cc) $(CFLAGSU) -DMINIMAL_FOR_RECOVER $< -o$@ $(cc) $(CFLAGSU) -DMINIMAL_FOR_RECOVER $< -o$@

View File

@@ -21,6 +21,9 @@ $(OM)/%.d: $(U)%.c $(NHLUAH) | $(OM)
$(OR)/recover.d: $(U)recover.c | $(OR) $(OR)/recover.d: $(U)recover.c | $(OR)
$(cce) $(CFLAGSU) $< -o$@ $(cce) $(CFLAGSU) $< -o$@
$(OR)/rversion.d: $(SRC)/version.c | $(OR)
$(cce) $(CFLAGSU) -DMINIMAL_FOR_RECOVER $< -o$@
$(OT)/tiletxt.d: $(WSHR)/tilemap.c $(NHLUAH) | $(OT) $(OT)/tiletxt.d: $(WSHR)/tilemap.c $(NHLUAH) | $(OT)
$(cce) $(CFLAGSU) -DTILETEXT $< -o$@ $(cce) $(CFLAGSU) -DTILETEXT $< -o$@