Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add another executable using the windows subsystem #3

Merged
merged 2 commits into from
Mar 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
*.res
*.a
raylua_e.exe
raylua_r.exe
raylua_s.exe
raylua_s
raylua_e
src/autogen/bind.c
src/autogen/boot.c
src/autogen/builder.c
libraylua.a
libraylua.a
9 changes: 7 additions & 2 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ MODULES := raymath rlgl easings gestures physac raygui
PLATFORM ?= PLATFORM_DESKTOP
GRAPHICS ?= GRAPHICS_API_OPENGL_33

CFLAGS += -D$(GRAPHICS)
CFLAGS += -D$(GRAPHICS) -D$(PLATFORM)

USE_WAYLAND_DISPLAY ?= FALSE
USE_EXTERNAL_GLFW ?= FALSE

ifeq ($(OS),Windows_NT)
LDFLAGS += -lopengl32 -lgdi32 -lwinmm -static
LDFLAGS_R += -mwindows
EXTERNAL_FILES := src/res/icon.res
else ifeq ($(shell uname),Darwin)
LDFLAGS += -framework CoreVideo -framework IOKit -framework Cocoa \
Expand All @@ -38,7 +39,7 @@ else
EXTERNAL_FILES :=
endif

all: raylua_s raylua_e luajit raylib
all: raylua_s raylua_e raylua_r luajit raylib

%.o: %.c
$(CC) -c -o $@ $< $(CFLAGS)
Expand All @@ -63,6 +64,10 @@ raylua_e: src/raylua_e.o src/raylua_self.o src/raylua_builder.o src/lib/miniz.o
$(EXTERNAL_FILES) libraylua.a
$(CC) -o $@ $^ $(LDFLAGS) luajit/src/libluajit.a

raylua_r: src/raylua_e.o src/raylua_self.o src/raylua_builder.o src/lib/miniz.o \
$(EXTERNAL_FILES) libraylua.a
$(CC) -o $@ $^ $(LDFLAGS) $(LDFLAGS_R) luajit/src/libluajit.a

src/res/icon.res: src/res/icon.rc
$(WINDRES) $^ -O coff $@

Expand Down