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