Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

build-windows:

runs-on: windows-2025
runs-on: windows-latest

steps:

Expand Down Expand Up @@ -75,4 +75,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: package-windows
path: staging/
path: staging/
21 changes: 19 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ $(call abc_info,$(MSG_PREFIX)Using AR=$(AR))
$(call abc_info,$(MSG_PREFIX)Using LD=$(LD))

PROG := abc

OS := $(shell uname -s)
ifneq ($(filter MINGW%,$(OS)),)
OS := MINGW
endif

MODULES := \
$(wildcard src/ext*) \
Expand Down Expand Up @@ -151,10 +155,15 @@ ifneq ($(OS), $(filter $(OS), FreeBSD OpenBSD NetBSD))
LIBS += -ldl
endif

ifneq ($(OS), $(filter $(OS), FreeBSD OpenBSD NetBSD Darwin))
ifneq ($(OS), $(filter $(OS), FreeBSD OpenBSD NetBSD Darwin MINGW))
LIBS += -lrt
endif

# For PathMatchSpecA.
ifeq ($(OS), MINGW)
LIBS += -lshlwapi
endif

ifdef ABC_USE_LIBSTDCXX
LIBS += -lstdc++
$(call abc_info,$(MSG_PREFIX)Using explicit -lstdc++)
Expand All @@ -164,7 +173,7 @@ $(call abc_info,$(MSG_PREFIX)Using CFLAGS=$(CFLAGS))
CXXFLAGS += $(CFLAGS) -std=c++17 -fno-exceptions

SRC :=
GARBAGE := core core.* *.stackdump ./tags $(PROG) arch_flags
GARBAGE := core core.* *.stackdump ./tags $(PROG) arch_flags $(PROG).in

.PHONY: all default tags clean docs cmake_info

Expand Down Expand Up @@ -231,9 +240,17 @@ clean:
tags:
etags `find . -type f -regex '.*\.\(c\|h\)'`

ifeq ($(OS), MINGW)
$(PROG): $(OBJ)
@echo "$(MSG_PREFIX)\`\` Constructing Response File:" $(notdir @$@.in)
$(file >$@.in,$^ $(LDFLAGS) $(LIBS))
@echo "$(MSG_PREFIX)\`\` Building binary:" $(notdir $@)
$(VERBOSE)$(LD) -o $@ @$@.in
else
$(PROG): $(OBJ)
@echo "$(MSG_PREFIX)\`\` Building binary:" $(notdir $@)
$(VERBOSE)$(LD) -o $@ $^ $(LDFLAGS) $(LIBS)
endif

lib$(PROG).a: $(LIBOBJ)
@echo "$(MSG_PREFIX)\`\` Linking:" $(notdir $@)
Expand Down