From d1a455dbbe9b1eedf8c482954d9b371f2f3b19ab Mon Sep 17 00:00:00 2001 From: William Bell <62452284+Ugric@users.noreply.github.com> Date: Sat, 16 Aug 2025 00:07:10 +0100 Subject: [PATCH] fix release.yml --- .github/workflows/release.yml | 9 +-------- Makefile | 15 +++++++++++++-- conan/profiles/windows-mingw | 8 -------- 3 files changed, 14 insertions(+), 18 deletions(-) delete mode 100644 conan/profiles/windows-mingw diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 69c8ed3..c8fc420 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -114,16 +114,9 @@ jobs: with: python-version: '3.x' - - name: Install Conan - run: | - python -m pip install --upgrade pip - pip install conan - conan profile detect - shell: pwsh - - name: Build with MinGW run: | - make + make windows shell: pwsh - name: Package diff --git a/Makefile b/Makefile index 151fc81..6e75c20 100644 --- a/Makefile +++ b/Makefile @@ -2,18 +2,29 @@ # # SPDX-License-Identifier: GPL-3.0-or-later +# Default FLEX tool +BINARY = bin/argon +FLEX_TOOL = flex + +# If target is "windows", override FLEX_TOOL +ifeq ($(MAKECMDGOALS),windows) + BINARY = bin/argon.exe + FLEX_TOOL = win_flex +endif + LEXER_SRC = src/lexer/lex.l LEXER_C = src/lexer/lex.yy.c LEXER_H = src/lexer/lex.yy.h CFILES = external/xxhash/xxhash.c external/cwalk/src/cwalk.c external/libdye/src/dye.c $(shell find src -name '*.c') CFLAGS = $(ARCHFLAGS) -lm -lgc -lgmp -Wall -Wextra -Wno-unused-function -Werror=unused-result -Iexternal/cwalk/include -Iexternal/libdye/include -BINARY = bin/argon all: $(BINARY) +windows: $(BINARY) + $(LEXER_C) $(LEXER_H): $(LEXER_SRC) - flex --header-file=$(LEXER_H) -o $(LEXER_C) $(LEXER_SRC) + $(FLEX_TOOL) --header-file=$(LEXER_H) -o $(LEXER_C) $(LEXER_SRC) $(BINARY): $(CFILES) $(LEXER_C) $(LEXER_H) mkdir -p bin diff --git a/conan/profiles/windows-mingw b/conan/profiles/windows-mingw deleted file mode 100644 index 4bcfcde..0000000 --- a/conan/profiles/windows-mingw +++ /dev/null @@ -1,8 +0,0 @@ -[settings] -os=Windows -arch=x86_64 -compiler=gcc -compiler.version=13 -compiler.cppstd=gnu17 -compiler.libcxx=libstdc++11 -build_type=Release \ No newline at end of file