Fix Makefiles
This commit is contained in:
30
Makefile
30
Makefile
@@ -1,15 +1,15 @@
|
||||
|
||||
IsMinGW=$(findstring MSYS,$(shell uname -s)) $(findstring MINGW,$(shell uname -s))
|
||||
ifneq (,$(IsMinGW))
|
||||
TARGET_ARCH:=mingw
|
||||
else
|
||||
TARGET_ARCH:=linux
|
||||
endif # windir
|
||||
|
||||
ifeq ($(TARGET_ARCH),mingw)
|
||||
include Makefile.win32
|
||||
else
|
||||
ifeq ($(TARGET_ARCH),linux)
|
||||
include Makefile.linux
|
||||
endif # linux
|
||||
endif # mingw
|
||||
|
||||
IsMinGW := $(findstring MSYS,$(shell uname -s))$(findstring MINGW,$(shell uname -s))
|
||||
ifneq (,$(IsMinGW))
|
||||
TARGET_ARCH := mingw
|
||||
else
|
||||
TARGET_ARCH := linux
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET_ARCH),mingw)
|
||||
include Makefile.win32
|
||||
else
|
||||
ifeq ($(TARGET_ARCH),linux)
|
||||
include Makefile.linux
|
||||
endif # linux
|
||||
endif # mingw
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
CC := emcc
|
||||
AR := emar
|
||||
LAUNCHER := start
|
||||
RM := rm -rf
|
||||
MKDIR := mkdir
|
||||
ECHO := echo
|
||||
|
||||
LIBS :=
|
||||
CFLAGS := -s FULL_ES2=1 -s ASM_JS=1 -O1 -Wno-implicit-function-declaration -DEMSCRIPTEN
|
||||
LDFLAGS := --preload-file data -s TOTAL_MEMORY=134217728
|
||||
|
||||
RES_GAMELIB := libgame.a
|
||||
RES_GAME := game.html
|
||||
BUILDDIR := build-emscripten
|
||||
|
||||
ifeq ($(target),release)
|
||||
CFLAGS := -s FULL_ES2=1 -s ASM_JS=1 -O1 --llvm-lto 1 -Wno-implicit-function-declaration -DEMSCRIPTEN
|
||||
BUILDDIR := build-emscripten-release
|
||||
LDFLAGS := --preload-file data -s TOTAL_MEMORY=134217728
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
|
||||
|
||||
CC := emcc
|
||||
AR := emar
|
||||
LAUNCHER := start
|
||||
RM := rm -rf
|
||||
MKDIR := mkdir
|
||||
ECHO := echo
|
||||
|
||||
LIBS :=
|
||||
CFLAGS := -s FULL_ES2=1 -s ASM_JS=1 -O1 -Wno-implicit-function-declaration -DEMSCRIPTEN
|
||||
LDFLAGS := --preload-file data -s TOTAL_MEMORY=134217728
|
||||
|
||||
RES_GAMELIB := libgame.a
|
||||
RES_GAME := game.html
|
||||
BUILDDIR := build-emscripten
|
||||
|
||||
ifeq ($(target),release)
|
||||
CFLAGS := -s FULL_ES2=1 -s ASM_JS=1 -O1 --llvm-lto 1 -Wno-implicit-function-declaration -DEMSCRIPTEN
|
||||
BUILDDIR := build-emscripten-release
|
||||
LDFLAGS := --preload-file data -s TOTAL_MEMORY=134217728
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
|
||||
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
CC := gcc
|
||||
AR := ar
|
||||
LAUNCHER :=
|
||||
RM := rm -rf
|
||||
MKDIR := mkdir
|
||||
ECHO := echo
|
||||
|
||||
LIBS := -lSDL -lpthread -L/usr/X11R6/lib -L/usr/lib -lm -lGL -lX11
|
||||
CFLAGS := -Wall -g -I/usr/include/ -I/usr/include/SDL/ -I/usr/X11R6/include/
|
||||
LDFLAGS :=
|
||||
|
||||
RES_GAMELIB := libgame.a
|
||||
RES_GAME := game
|
||||
BUILDDIR := build-$(shell gcc -v 2>&1 | grep "Target:" | cut --delimiter=' ' --fields=2)
|
||||
|
||||
include Makefile.common
|
||||
CC := gcc
|
||||
AR := ar
|
||||
LAUNCHER :=
|
||||
RM := rm -rf
|
||||
MKDIR := mkdir
|
||||
ECHO := echo
|
||||
|
||||
LIBS := -lSDL -lpthread -L/usr/X11R6/lib -L/usr/lib -lm -lGL -lX11
|
||||
CFLAGS := -Wall -g -I/usr/include/ -I/usr/include/SDL/ -I/usr/X11R6/include/
|
||||
LDFLAGS :=
|
||||
|
||||
RES_GAMELIB := libgame.a
|
||||
RES_GAME := game
|
||||
BUILDDIR := build-$(shell gcc -v 2>&1 | grep "Target:" | cut --delimiter=' ' --fields=2)
|
||||
|
||||
include Makefile.common
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
CC := i486-mingw32-gcc
|
||||
AR := i486-mingw32-ar
|
||||
LAUNCHER :=
|
||||
RM := rm -rf
|
||||
MKDIR := mkdir
|
||||
ECHO := echo
|
||||
|
||||
LIBS := -L/usr/i486-mingw/lib -D_GNU_SOURCE=1 -Dmain=SDL_main -lopengl32 -lmingw32 -lSDLmain -lSDL
|
||||
CFLAGS := -I/usr/i486-mingw/include -mwindows
|
||||
LDFLAGS :=
|
||||
|
||||
RES_GAMELIB := libgame.a
|
||||
RES_GAME := game.exe
|
||||
BUILDDIR := build-mingw
|
||||
|
||||
include Makefile.common
|
||||
|
||||
|
||||
CC := i486-mingw32-gcc
|
||||
AR := i486-mingw32-ar
|
||||
LAUNCHER :=
|
||||
RM := rm -rf
|
||||
MKDIR := mkdir
|
||||
ECHO := echo
|
||||
|
||||
LIBS := -L/usr/i486-mingw/lib -D_GNU_SOURCE=1 -Dmain=SDL_main -lopengl32 -lmingw32 -lSDLmain -lSDL
|
||||
CFLAGS := -I/usr/i486-mingw/include -mwindows
|
||||
LDFLAGS :=
|
||||
|
||||
RES_GAMELIB := libgame.a
|
||||
RES_GAME := game.exe
|
||||
BUILDDIR := build-mingw
|
||||
|
||||
include Makefile.common
|
||||
|
||||
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
CC := gcc
|
||||
AR := ar
|
||||
LAUNCHER :=
|
||||
RM := rm -rf
|
||||
MKDIR := mkdir
|
||||
ECHO := echo
|
||||
|
||||
LIBS := -L/mingw/lib -lopengl32 -lSDL
|
||||
#CFLAGS := -I/mingw/include -g -mwindows -D_GNU_SOURCE=1
|
||||
CFLAGS := -g -mwindows -D_GNU_SOURCE=1
|
||||
LDFLAGS := -g -mwindows -D_GNU_SOURCE=1
|
||||
|
||||
RES_GAMELIB := libgame.a
|
||||
RES_GAME := game.exe
|
||||
BUILDDIR := build-$(shell gcc -v 2>&1 | grep "Target:" | cut --delimiter=' ' --fields=2)
|
||||
|
||||
include Makefile.common
|
||||
|
||||
|
||||
CC := gcc
|
||||
AR := ar
|
||||
LAUNCHER :=
|
||||
RM := rm -rf
|
||||
MKDIR := mkdir
|
||||
ECHO := echo
|
||||
|
||||
LIBS := -L/mingw/lib -lopengl32 -lSDL
|
||||
#CFLAGS := -I/mingw/include -g -mwindows -D_GNU_SOURCE=1
|
||||
CFLAGS := -g -mwindows -D_GNU_SOURCE=1
|
||||
LDFLAGS := -g -mwindows -D_GNU_SOURCE=1
|
||||
|
||||
RES_GAMELIB := libgame.a
|
||||
RES_GAME := game.exe
|
||||
BUILDDIR := build-$(shell gcc -v 2>&1 | grep "Target:" | cut --delimiter=' ' --fields=2)
|
||||
|
||||
include Makefile.common
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
#make -f Makefile.emscripten target=release clean
|
||||
#make -f Makefile.emscripten target=release
|
||||
|
||||
make -f Makefile.emscripten clean
|
||||
make -f Makefile.emscripten
|
||||
|
||||
mkdir -p DIST/web
|
||||
cp -Rv web/* DIST/web/
|
||||
#cp -v build-emscripten-release/game.* DIST/web/
|
||||
cp -v build-emscripten/game.* DIST/web/
|
||||
#!/bin/sh
|
||||
|
||||
#make -f Makefile.emscripten target=release clean
|
||||
#make -f Makefile.emscripten target=release
|
||||
|
||||
make -f Makefile.emscripten clean
|
||||
make -f Makefile.emscripten
|
||||
|
||||
mkdir -p DIST/web
|
||||
cp -Rv web/* DIST/web/
|
||||
#cp -v build-emscripten-release/game.* DIST/web/
|
||||
cp -v build-emscripten/game.* DIST/web/
|
||||
|
||||
Reference in New Issue
Block a user