Skip to content
Draft
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
*.o
.*.sw*
/samu
out/
.vs/
.vscode/
.cache/
build/
CMakeUserPresets.json
CMakePresets.json
CMakeSettings.json
*.user
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are probably better to put in your .git/info/exclude instead.

Copy link
Copy Markdown
Author

@cyanidle cyanidle Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, will revert later probably

29 changes: 29 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
cmake_minimum_required(VERSION 3.16)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think it's possible to get the Makefile to work with nmake?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NMake is not very compatible with Make, easier to maintain both, considering project simplicity

project(samurai C)

set(SOURCE
build.c
deps.c
env.c
graph.c
htab.c
log.c
parse.c
samu.c
scan.c
tool.c
tree.c
util.c
)

if (WIN32)
list(APPEND SOURCE os-win32.c samu.manifest)
elseif(UNIX)
list(APPEND SOURCE os-posix.c)
endif()

add_executable(samu ${SOURCE})

if (UNIX)
target_link_libraries(samu PRIVATE rt)
endif()
2 changes: 1 addition & 1 deletion arg.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ extern const char *argv0;
switch (*opt_)

#define ARGEND \
} \
} \
}

#define EARGF(x) \
Expand Down
Loading