Skip to content
Open
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
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)
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