Run on windows OR unix
This commit is contained in:
parent
0b21febc6b
commit
075d119ab3
10
makefile
10
makefile
|
@ -1,7 +1,13 @@
|
|||
CC?=gcc
|
||||
LD?=ld
|
||||
SHROOMSFLAGS=shrooms-vb-core/core/vb.c -I shrooms-vb-core/core
|
||||
SDL2FLAGS=$(shell pkg-config sdl2 --cflags --libs) -mconsole
|
||||
msys_version := $(if $(findstring Msys, $(shell uname -o)),$(word 1, $(subst ., ,$(shell uname -r))),0)
|
||||
|
||||
ifeq ($(msys_version), 0)
|
||||
SDL2FLAGS=$(shell pkg-config sdl2 --cflags --libs)
|
||||
else
|
||||
SDL2FLAGS=$(shell pkg-config sdl2 --cflags --libs) -mwindows -mconsole
|
||||
endif
|
||||
|
||||
.PHONY: clean build
|
||||
clean:
|
||||
|
@ -34,7 +40,7 @@ output/vb.o: shrooms-vb-core/core/vb.c
|
|||
|
||||
output/%.o: assets/%.bin
|
||||
@mkdir -p output
|
||||
@$(LD) -r -b binary -o $@ $<
|
||||
@$(LD) -r -b binary -z noexecstack -o $@ $<
|
||||
|
||||
shrooms-vb: $(OFILES)
|
||||
@$(CC) -o $@ $(OFILES) $(SDL2FLAGS) -flto
|
||||
|
|
Loading…
Reference in New Issue