Compare commits

..

5 Commits

Author SHA1 Message Date
William Bell
0f45052dce fix for winblows 2025-08-16 00:56:35 +01:00
William Bell
68f4207216 fix for winblows 2025-08-16 00:54:33 +01:00
William Bell
f9f8ca08c6 fix bug for windows 2025-08-16 00:50:23 +01:00
William Bell
0666b02c13 fix flex tool 2025-08-16 00:44:00 +01:00
William Bell
1654507835 fix for windows 2025-08-16 00:42:13 +01:00
3 changed files with 9 additions and 11 deletions

View File

@@ -122,7 +122,7 @@ jobs:
- name: Build Project
run: |
make
make windows
- name: Package
run: |

View File

@@ -8,14 +8,6 @@ FLEX_TOOL = flex
CFILES = external/xxhash/xxhash.c external/cwalk/src/cwalk.c external/libdye/src/dye.c $(shell find src -name '*.c')
# If target is "windows", override FLEX_TOOL
ifeq ($(MAKECMDGOALS),windows)
BINARY = bin/argon.exe
FLEX_TOOL = win_flex
CFILES = external/xxhash/xxhash.c external/cwalk/src/cwalk.c external/libdye/src/dye.c $(shell dir /b /s src\*.c)
endif
LEXER_SRC = src/lexer/lex.l
LEXER_C = src/lexer/lex.yy.c
LEXER_H = src/lexer/lex.yy.h
@@ -32,7 +24,10 @@ $(BINARY): $(CFILES) $(LEXER_C) $(LEXER_H)
gcc -O3 -o $(BINARY) $(CFILES) $(CFLAGS) -s
windows: $(CFILES) $(LEXER_C) $(LEXER_H)
find external/xxhash external/cwalk external/libdye src -name '*.c' > sources.txt
(echo -n "external/xxhash/xxhash.c " ; \
echo -n "external/cwalk/src/cwalk.c " ; \
echo -n "external/libdye/src/dye.c " ; \
find src -name '*.c' -print0 | xargs -0 echo -n) > sources.txt
mkdir -p bin
gcc -O3 -march=native -o $(BINARY) @sources.txt $(CFLAGS)

View File

@@ -16,8 +16,11 @@
#include <string.h>
#if defined(_WIN32)
#include <psapi.h>
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0602
#endif
#include <windows.h>
#include <psapi.h>
double get_memory_usage_mb() {
PROCESS_MEMORY_COUNTERS pmc;