Optimize Makefiles
This commit is contained in:
1
Makefile
1
Makefile
@@ -6,7 +6,6 @@ else
|
||||
TARGET_ARCH=linux
|
||||
endif # windir
|
||||
|
||||
|
||||
ifeq ($(TARGET_ARCH),mingw)
|
||||
include Makefile.win32
|
||||
else
|
||||
|
||||
@@ -16,7 +16,7 @@ endif
|
||||
# GameLib Declarations #
|
||||
########################
|
||||
CFLAGS += -IGameLib
|
||||
GAMELIB_HEADS = \
|
||||
GAMELIB_HEADS := \
|
||||
GameLib/Time.h \
|
||||
GameLib/Util.h \
|
||||
GameLib/QuadArray2D.h \
|
||||
@@ -26,7 +26,7 @@ GAMELIB_HEADS = \
|
||||
GameLib/Anim.h \
|
||||
GameLib/Entity.h \
|
||||
GameLib/GameLib.h
|
||||
GAMELIBS_OBJS = \
|
||||
GAMELIBS_OBJS := \
|
||||
$(BUILDDIR)/GameLib/Time.o \
|
||||
$(BUILDDIR)/GameLib/Util.o \
|
||||
$(BUILDDIR)/GameLib/QuadArray2D.o \
|
||||
@@ -36,17 +36,17 @@ GAMELIBS_OBJS = \
|
||||
$(BUILDDIR)/GameLib/Anim.o \
|
||||
$(BUILDDIR)/GameLib/Entity.o \
|
||||
$(BUILDDIR)/GameLib/GameLib.o
|
||||
RES_GAMELIB_OUT = $(BUILDDIR)/$(RES_GAMELIB)
|
||||
RES_GAMELIB_OUT := $(BUILDDIR)/$(RES_GAMELIB)
|
||||
|
||||
#####################
|
||||
# Game Declarations #
|
||||
#####################
|
||||
GAME_HEADS = $(GAMELIB_HEADS) Game/GameEnts.h Game/GameMap.h
|
||||
GAME_OBJS = \
|
||||
GAME_HEADS := $(GAMELIB_HEADS) Game/GameEnts.h Game/GameMap.h
|
||||
GAME_OBJS := \
|
||||
$(BUILDDIR)/Game/GameEnts.o \
|
||||
$(BUILDDIR)/Game/GameMap.o \
|
||||
$(BUILDDIR)/Game/main.o
|
||||
RES_GAME_OUT = $(BUILDDIR)/$(RES_GAME)
|
||||
RES_GAME_OUT := $(BUILDDIR)/$(RES_GAME)
|
||||
|
||||
|
||||
#################
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
CC = emcc
|
||||
AR = emar
|
||||
LAUNCHER = start
|
||||
RM = rm -rf
|
||||
MKDIR = mkdir
|
||||
ECHO = echo
|
||||
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
|
||||
LIBS :=
|
||||
CFLAGS := -s FULL_ES2=1 -s ASM_JS=1 -O1 -Wno-implicit-function-declaration -DEMSCRIPTEN
|
||||
LDFLAGS := --preload-file data
|
||||
|
||||
RES_GAMELIB = libgame.a
|
||||
RES_GAME = game.html
|
||||
BUILDDIR = build-emscripten
|
||||
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
|
||||
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
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
CC = gcc
|
||||
AR = ar
|
||||
LAUNCHER =
|
||||
RM = rm -rf
|
||||
MKDIR = mkdir
|
||||
ECHO = echo
|
||||
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 :=
|
||||
|
||||
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)
|
||||
RES_GAMELIB := libgame.a
|
||||
RES_GAME := game
|
||||
BUILDDIR := build-$(shell gcc -v 2>&1 | grep "Target:" | cut --delimiter=' ' --fields=2)
|
||||
|
||||
include Makefile.common
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
CC = i486-mingw32-gcc
|
||||
AR = i486-mingw32-ar
|
||||
LAUNCHER =
|
||||
RM = rm -rf
|
||||
MKDIR = mkdir
|
||||
ECHO = echo
|
||||
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 =
|
||||
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
|
||||
RES_GAMELIB := libgame.a
|
||||
RES_GAME := game.exe
|
||||
BUILDDIR := build-mingw
|
||||
|
||||
include Makefile.common
|
||||
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
CC = gcc
|
||||
AR = ar
|
||||
LAUNCHER =
|
||||
RM = rm -rf
|
||||
MKDIR = mkdir
|
||||
ECHO = echo
|
||||
CC := gcc
|
||||
AR := ar
|
||||
LAUNCHER :=
|
||||
RM := rm -rf
|
||||
MKDIR := mkdir
|
||||
ECHO := echo
|
||||
|
||||
LIBS = -L/mingw/lib -Dmain=SDL_main -lopengl32 -lSDLmain -lSDL
|
||||
CFLAGS = -I/mingw/include -g -mwindows -D_GNU_SOURCE=1
|
||||
LDFLAGS = -g -mwindows -D_GNU_SOURCE=1
|
||||
LIBS := -L/mingw/lib -Dmain=SDL_main -lopengl32 -lSDLmain -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)
|
||||
RES_GAMELIB := libgame.a
|
||||
RES_GAME := game.exe
|
||||
BUILDDIR := build-$(shell gcc -v 2>&1 | grep "Target:" | cut --delimiter=' ' --fields=2)
|
||||
|
||||
include Makefile.common
|
||||
|
||||
|
||||
Reference in New Issue
Block a user