Compare commits

..

3 Commits

Author SHA1 Message Date
5f343c2126 ldargs go after sourcesgit add . 2025-11-27 14:49:13 +02:00
0c05556eb1 fix makefile 2025-11-27 14:22:22 +02:00
15f7da2df9 add .gitignore 2025-11-27 14:13:34 +02:00
3 changed files with 10 additions and 4 deletions

5
.gitignore vendored Normal file
View File

@@ -0,0 +1,5 @@
/*
!/src
!/Makefile
!/Readme.md
!/.gitignore

View File

@@ -1,5 +1,6 @@
# Generated by mklua # Generated by mklua
MKLUA ?= lua src/bootstrap.lua LUA ?= lua
MKLUA ?= $(LUA) src/bootstrap.lua
CC ?= cc CC ?= cc
OUTPUT = mklua OUTPUT = mklua
@@ -31,7 +32,7 @@ clean:
rm -f $(OUTPUT) $(OUTPUT).c rm -f $(OUTPUT) $(OUTPUT).c
$(OUTPUT): $(OUTPUT).c $(LIBS) $(OUTPUT): $(OUTPUT).c $(LIBS)
$(CC) $(CCARGS) $(LDARGS) $^ -o $@ $(CC) $(CCARGS) $^ $(LDARGS) -o $@
$(OUTPUT).c: $(DEPS) $(OUTPUT).c: $(DEPS)
$(MKLUA) $(MKLUA_FLAGS) $(MKLUA_ENTRIES) -o $@ $(MKLUA) $(MKLUA_FLAGS) $(MKLUA_ENTRIES) -o $@

View File

@@ -111,7 +111,7 @@ clean:
rm -f $(OUTPUT) $(OUTPUT).c rm -f $(OUTPUT) $(OUTPUT).c
$(OUTPUT): $(OUTPUT).c $(LIBS) $(OUTPUT): $(OUTPUT).c $(LIBS)
$(CC) $(CCARGS) $(LDARGS) $^ -o $@ $(CC) $(CCARGS) $^ $(LDARGS) -o $@
$(OUTPUT).c: $(DEPS) $(OUTPUT).c: $(DEPS)
$(MKLUA) $(MKLUA_FLAGS) $(MKLUA_ENTRIES) -o $@ $(MKLUA) $(MKLUA_FLAGS) $(MKLUA_ENTRIES) -o $@
@@ -153,7 +153,7 @@ local function c_escape(str)
for i = 1, math.ceil(#str / 32) do for i = 1, math.ceil(#str / 32) do
table.insert(parts, "\"" .. str:sub((i - 1) * 32 + 1, i * 32):gsub(".", function (c) table.insert(parts, "\"" .. str:sub((i - 1) * 32 + 1, i * 32):gsub(".", function (c)
local b = string.byte(c); local b = string.byte(c);
if c == "\n" then if c == "\n" then
return "\\n"; return "\\n";
elseif c == "\\" then elseif c == "\\" then