Cleanup

Author Mitja Felicijan <mitja.felicijan@gmail.com> 2025-08-06 13:06:10 +0200
Committer Mitja Felicijan <mitja.felicijan@gmail.com> 2025-08-06 13:06:10 +0200
Commit 357c1fd13ff3e39b002af8a92a6829f034146aeb (patch)
-rw-r--r-- Makefile 6
-rw-r--r-- test/main.lua 2
2 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
...
4
CFLAGS       := -std=c99 -v -g -I./vendor/$(RAYLIB)/include -I./vendor/$(LUA)/src
4
CFLAGS       := -std=c99 -v -g -I./vendor/$(RAYLIB)/include -I./vendor/$(LUA)/src
5
LDFLAGS      := -L./vendor/$(RAYLIB)/lib -lraylib -L./vendor/$(LUA)/src -llua -lm
5
LDFLAGS      := -L./vendor/$(RAYLIB)/lib -lraylib -L./vendor/$(LUA)/src -llua -lm
6
STDLIB_FILES := $(wildcard stdlib/*.lua)
6
STDLIB_FILES := $(wildcard stdlib/*.lua)
  
7
FONT_FILES   := $(wildcard fonts/*.ttf)
7
PROG         := bidi
8
PROG         := bidi
8
PROG_C       := main.c
9
PROG_C       := main.c
9
  
10
  
10
all: lua hexdump $(STDLIB_FILES:.lua=.h) $(PROG)
11
all: lua hexdump $(FONT_FILES:.ttf=.h) $(STDLIB_FILES:.lua=.h) $(PROG)
11
  
12
  
12
%.h: %.lua
13
%.h: %.lua
13
	./hexdump $< $(@:stdlib/%.h=%) > $@
14
	./hexdump $< $(@:stdlib/%.h=%) > $@
  
15
  
  
16
%.h: %.ttf
  
17
	./hexdump $< $(@:fonts/%.h=%) > $@
14
  
18
  
15
$(PROG): $(PROG_C)
19
$(PROG): $(PROG_C)
16
	$(CC) $(CFLAGS) $(PROG_C) -o $(PROG) $(LDFLAGS)
20
	$(CC) $(CFLAGS) $(PROG_C) -o $(PROG) $(LDFLAGS)
...
diff --git a/test/main.lua b/test/main.lua
...
18
	while window_running() do
18
	while window_running() do
19
		begin_drawing()
19
		begin_drawing()
20
		clear_window(color.BLACK)
20
		clear_window(color.BLACK)
21
		draw_fps()
21
		draw_fps_meter()
22
		end_drawing()
22
		end_drawing()
23
	end
23
	end
24
  
24
  
...