Add icon for Windows.
This commit is contained in:
parent
75a3b0033e
commit
06d7c2f2da
3
.gitignore
vendored
3
.gitignore
vendored
@ -9,3 +9,6 @@ raylua_s.exe
|
|||||||
src/autogen/bind.c
|
src/autogen/bind.c
|
||||||
src/autogen/boot.c
|
src/autogen/boot.c
|
||||||
src/autogen/builder.c
|
src/autogen/builder.c
|
||||||
|
|
||||||
|
libraylua.a
|
||||||
|
src/res/icon.res
|
||||||
|
29
makefile
29
makefile
@ -4,6 +4,8 @@ LDFLAGS := -O2 -s -lm
|
|||||||
AR ?= ar
|
AR ?= ar
|
||||||
LUA ?= luajit/src/luajit
|
LUA ?= luajit/src/luajit
|
||||||
|
|
||||||
|
WINDRES ?= windres
|
||||||
|
|
||||||
CFLAGS += -Iluajit/src -Iraylib/src -Iraygui/src
|
CFLAGS += -Iluajit/src -Iraylib/src -Iraygui/src
|
||||||
LDFLAGS += -Lluajit/src -Lraylib/src -lraylib
|
LDFLAGS += -Lluajit/src -Lraylib/src -lraylib
|
||||||
|
|
||||||
@ -11,31 +13,38 @@ MODULES := raymath rlgl easings gestures physac raygui
|
|||||||
|
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
LDFLAGS += -lopengl32 -lgdi32 -lwinmm -static
|
LDFLAGS += -lopengl32 -lgdi32 -lwinmm -static
|
||||||
|
EXTERNAL_FILES := src/res/icon.res
|
||||||
else ifeq ($(shell uname),Darwin)
|
else ifeq ($(shell uname),Darwin)
|
||||||
LDFLAGS += -framework CoreVideo -framework IOKit -framework Cocoa -framework GLUT -framework OpenGL -Wl,-pagezero_size,10000,-image_base,100000000
|
LDFLAGS += -framework CoreVideo -framework IOKit -framework Cocoa \
|
||||||
|
-framework GLUT -framework OpenGL \
|
||||||
|
-Wl,-pagezero_size,10000,-image_base,100000000
|
||||||
|
EXTERNAL_FILES :=
|
||||||
else
|
else
|
||||||
LDFLAGS += -ldl -lX11 -lpthread
|
LDFLAGS += -ldl -lX11 -lpthread
|
||||||
|
EXTERNAL_FILES :=
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all: raylua_s raylua_e
|
all: raylua_s raylua_e luajit raylib
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
$(CC) -c -o $@ $< $(CFLAGS)
|
$(CC) -c -o $@ $< $(CFLAGS)
|
||||||
|
|
||||||
all: raylua_s raylua_e luajit raylib
|
|
||||||
|
|
||||||
luajit:
|
luajit:
|
||||||
$(MAKE) -C luajit amalg BUILDMODE=static MACOSX_DEPLOYMENT_TARGET=10.13
|
$(MAKE) -C luajit amalg BUILDMODE=static MACOSX_DEPLOYMENT_TARGET=10.13
|
||||||
|
|
||||||
raylib:
|
raylib:
|
||||||
$(MAKE) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" -C raylib/src
|
$(MAKE) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" -C raylib/src
|
||||||
|
|
||||||
raylua_s: src/raylua.o src/raylua_s.o
|
raylua_s: src/raylua_s.o $(EXTERNAL_FILES) libraylua.a
|
||||||
$(CC) -o $@ $^ $(LDFLAGS) luajit/src/libluajit.a
|
$(CC) -o $@ $^ $(LDFLAGS) luajit/src/libluajit.a
|
||||||
|
|
||||||
raylua_e: src/raylua.o src/raylua_e.o src/raylua_builder.o src/lib/miniz.o
|
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
|
$(CC) -o $@ $^ $(LDFLAGS) luajit/src/libluajit.a
|
||||||
|
|
||||||
|
src/res/icon.res: src/res/icon.rc
|
||||||
|
$(WINDRES) $^ -O coff $@
|
||||||
|
|
||||||
libraylua.a: src/raylua.o
|
libraylua.a: src/raylua.o
|
||||||
$(AR) rcu $@ $^
|
$(AR) rcu $@ $^
|
||||||
|
|
||||||
@ -59,9 +68,11 @@ src/autogen/builder.c: src/raylua_builder.lua
|
|||||||
$(LUA) tools/lua2str.lua $@ raylua_builder_lua $^
|
$(LUA) tools/lua2str.lua $@ raylua_builder_lua $^
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf raylua_s raylua_e src/raylua_e.o src/raylua_s.o src/raylua.o \
|
rm -rf raylua_s raylua_e libraylua.a src/raylua_e.o src/raylua_s.o \
|
||||||
src/raylua_builder.o src/autogen/*.c src/lib/miniz.o
|
src/raylua.o src/raylua_self.o src/raylua_builder.o src/autogen/*.c \
|
||||||
|
src/lib/miniz.o
|
||||||
$(MAKE) -C luajit clean
|
$(MAKE) -C luajit clean
|
||||||
$(MAKE) -C raylib/src clean
|
$(MAKE) -C raylib/src clean
|
||||||
|
|
||||||
.PHONY: all src/autogen/bind.c src/autogen/boot.c raylua_s raylua_e luajit raylib clean
|
.PHONY: all src/autogen/bind.c src/autogen/boot.c raylua_s raylua_e luajit \
|
||||||
|
raylib clean
|
||||||
|
BIN
src/res/icon.ico
Normal file
BIN
src/res/icon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
1
src/res/icon.rc
Normal file
1
src/res/icon.rc
Normal file
@ -0,0 +1 @@
|
|||||||
|
id ICON "icon.ico"
|
Loading…
Reference in New Issue
Block a user