[arch-commits] Commit in simutrans/trunk (Makefile PKGBUILD common.mk)
Date: Thursday, January 9, 2020 @ 02:21:05 Author: bgyorgy Revision: 550967 upgpkg: simutrans 121.0-1: Update to new version Modified: simutrans/trunk/PKGBUILD Deleted: simutrans/trunk/Makefile simutrans/trunk/common.mk ---+ Makefile | 720 PKGBUILD | 14 - common.mk | 56 3 files changed, 5 insertions(+), 785 deletions(-) Deleted: Makefile === --- Makefile2020-01-09 02:06:02 UTC (rev 550966) +++ Makefile2020-01-09 02:21:05 UTC (rev 550967) @@ -1,720 +0,0 @@ -CFG ?= default --include config.$(CFG) - -HOSTCC?=$(CC) -HOSTCXX?=$(CXX) - -PROFILE ?= 0 -STATIC ?= 0 -AV_FOUNDATION ?= 0 - -ALLEGRO_CONFIG ?= allegro-config -SDL_CONFIG ?= sdl-config -SDL2_CONFIG ?= sdl2-config -FREETYPE_CONFIG ?= freetype-config - -BACKENDS = allegro gdi opengl sdl sdl2 mixer_sdl mixer_sdl2 posix -COLOUR_DEPTHS = 0 16 -OSTYPES = amiga beos freebsd haiku linux mingw mac openbsd - -ifeq ($(findstring $(BACKEND), $(BACKENDS)),) - $(error Unkown BACKEND "$(BACKEND)", must be one of "$(BACKENDS)") -endif - -ifeq ($(findstring $(COLOUR_DEPTH), $(COLOUR_DEPTHS)),) - $(error Unkown COLOUR_DEPTH "$(COLOUR_DEPTH)", must be one of "$(COLOUR_DEPTHS)") -endif - -ifeq ($(findstring $(OSTYPE), $(OSTYPES)),) - $(error Unkown OSTYPE "$(OSTYPE)", must be one of "$(OSTYPES)") -endif - -ifeq ($(OSTYPE),amiga) - STD_LIBS ?= -lunix -lSDL_mixer -lsmpeg -lvorbisfile -lvorbis -logg - CFLAGS += -mcrt=newlib -DSIM_BIG_ENDIAN -gstabs+ - LDFLAGS += -Bstatic -non_shared -else - # BeOS (obsolete) - ifeq ($(OSTYPE),beos) -LIBS += -lnet - else -ifeq ($(OSTYPE),mingw) - CFLAGS += -DPNG_STATIC -DZLIB_STATIC - ifeq ($(shell expr $(STATIC) \>= 1), 1) -CFLAGS += -static -LDFLAGS += -static-libgcc -static-libstdc++ -static - endif - LDFLAGS += -pthread -Wl,--large-address-aware - SOURCES += simsys_w32_png.cc - CFLAGS += -DNOMINMAX -DWIN32_LEAN_AND_MEAN -DWINVER=0x0501 -D_WIN32_IE=0x0500 - LIBS+= -lmingw32 -lgdi32 -lwinmm -lws2_32 -limm32 - # Disable the console on Windows unless WIN32_CONSOLE is set or graphics are disabled - ifdef WIN32_CONSOLE -ifeq ($(shell expr $(WIN32_CONSOLE) \>= 1), 1) - LDFLAGS += -mconsole -endif - else -ifeq ($(BACKEND),posix) - LDFLAGS += -mconsole -else - LDFLAGS += -mwindows -endif - endif -else - # Haiku (needs to activate the GCC 4x) - ifeq ($(OSTYPE),haiku) -LIBS += -lnetwork -lbe - endif -endif - endif -endif - -ifeq ($(OSTYPE),mingw) - SOURCES += clipboard_w32.cc -else - ifeq ($(BACKEND),SDL2) -SOURCES += clipboard_s.cc - else -SOURCES += clipboard_internal.cc - endif -endif - -LIBS += -lbz2 -lz - -ifdef OPTIMISE - ifeq ($(shell expr $(OPTIMISE) \>= 1), 1) -CFLAGS += -O3 -ifeq ($(findstring $(OSTYPE), amiga),) - ifneq ($(findstring $(CXX), clang),) -CFLAGS += -minline-all-stringops - endif -endif - endif -else - CFLAGS += -O -endif - -ifdef DEBUG - ifndef MSG_LEVEL -MSG_LEVEL = 3 - endif - ifeq ($(shell expr $(DEBUG) \>= 1), 1) -CFLAGS += -g -DDEBUG - endif - ifeq ($(shell expr $(DEBUG) \>= 2), 1) -ifeq ($(shell expr $(PROFILE) \>= 2), 1) - CFLAGS += -fno-inline -endif - endif - ifeq ($(shell expr $(DEBUG) \>= 3), 1) -ifeq ($(shell expr $(PROFILE) \>= 2), 1) - CFLAGS += -O0 -endif - endif -else - CFLAGS += -DNDEBUG -endif - -ifdef MSG_LEVEL - CFLAGS += -DMSG_LEVEL=$(MSG_LEVEL) -endif - -ifdef USE_FREETYPE - ifeq ($(shell expr $(USE_FREETYPE) \>= 1), 1) -CFLAGS += -DUSE_FREETYPE -ifneq ($(FREETYPE_CONFIG),) - CFLAGS += $(shell $(FREETYPE_CONFIG) --cflags) - ifeq ($(shell expr $(STATIC) \>= 1), 1) -LDFLAGS += $(shell $(FREETYPE_CONFIG) --libs --static) - else -LDFLAGS += $(shell $(FREETYPE_CONFIG) --libs) - endif -else - LDFLAGS += -lfreetype - ifeq ($(OSTYPE),mingw) -LDFLAGS += -lpng -lharfbuzz -lgraphite2 - endif -endif -ifeq ($(OSTYPE),mingw) - LDFLAGS += -lfreetype -endif - endif -endif - -ifdef USE_UPNP - ifeq ($(shell expr $(USE_UPNP) \>= 1), 1) -CFLAGS += -DUSE_UPNP -LDFLAGS += -lminiupnpc -ifeq ($(OSTYPE),mingw) - ifeq ($(shell expr $(STATIC) \>= 1), 1) -LDFLAGS += -Wl,-Bdynamic - endif - LDFLAGS += -liphlpapi - ifeq ($(shell expr $(STATIC) \>= 1), 1) -LDFLAGS += -Wl,-Bstatic - endif -endif - endif -endif - -ifeq ($(shell expr $(PROFILE) \>= 1), 1) - CFLAGS += -pg -DPROFILE - ifeq ($(shell expr $(PROFILE) \>= 2), 1) -CFLAGS += -fno-inline -fno-schedule-insns - endif - LDFLAGS += -pg -endif - -ifdef MULTI_THREAD - ifeq ($(shell expr $(MULTI_THREAD) \>= 1), 1) -CFLAGS += -DMULTI_THREAD -ifneq ($(O
[arch-commits] Commit in simutrans/trunk (Makefile PKGBUILD common.mk)
Date: Monday, September 17, 2018 @ 16:33:22 Author: bgyorgy Revision: 382619 upgpkg: simutrans 120.4-1 Update to new version Added: simutrans/trunk/Makefile simutrans/trunk/common.mk Modified: simutrans/trunk/PKGBUILD ---+ Makefile | 720 PKGBUILD | 10 common.mk | 56 3 files changed, 782 insertions(+), 4 deletions(-) Added: Makefile === --- Makefile(rev 0) +++ Makefile2018-09-17 16:33:22 UTC (rev 382619) @@ -0,0 +1,720 @@ +CFG ?= default +-include config.$(CFG) + +HOSTCC?=$(CC) +HOSTCXX?=$(CXX) + +PROFILE ?= 0 +STATIC ?= 0 +AV_FOUNDATION ?= 0 + +ALLEGRO_CONFIG ?= allegro-config +SDL_CONFIG ?= sdl-config +SDL2_CONFIG ?= sdl2-config +FREETYPE_CONFIG ?= freetype-config + +BACKENDS = allegro gdi opengl sdl sdl2 mixer_sdl mixer_sdl2 posix +COLOUR_DEPTHS = 0 16 +OSTYPES = amiga beos freebsd haiku linux mingw mac openbsd + +ifeq ($(findstring $(BACKEND), $(BACKENDS)),) + $(error Unkown BACKEND "$(BACKEND)", must be one of "$(BACKENDS)") +endif + +ifeq ($(findstring $(COLOUR_DEPTH), $(COLOUR_DEPTHS)),) + $(error Unkown COLOUR_DEPTH "$(COLOUR_DEPTH)", must be one of "$(COLOUR_DEPTHS)") +endif + +ifeq ($(findstring $(OSTYPE), $(OSTYPES)),) + $(error Unkown OSTYPE "$(OSTYPE)", must be one of "$(OSTYPES)") +endif + +ifeq ($(OSTYPE),amiga) + STD_LIBS ?= -lunix -lSDL_mixer -lsmpeg -lvorbisfile -lvorbis -logg + CFLAGS += -mcrt=newlib -DSIM_BIG_ENDIAN -gstabs+ + LDFLAGS += -Bstatic -non_shared +else + # BeOS (obsolete) + ifeq ($(OSTYPE),beos) +LIBS += -lnet + else +ifeq ($(OSTYPE),mingw) + CFLAGS += -DPNG_STATIC -DZLIB_STATIC + ifeq ($(shell expr $(STATIC) \>= 1), 1) +CFLAGS += -static +LDFLAGS += -static-libgcc -static-libstdc++ -static + endif + LDFLAGS += -pthread -Wl,--large-address-aware + SOURCES += simsys_w32_png.cc + CFLAGS += -DNOMINMAX -DWIN32_LEAN_AND_MEAN -DWINVER=0x0501 -D_WIN32_IE=0x0500 + LIBS+= -lmingw32 -lgdi32 -lwinmm -lws2_32 -limm32 + # Disable the console on Windows unless WIN32_CONSOLE is set or graphics are disabled + ifdef WIN32_CONSOLE +ifeq ($(shell expr $(WIN32_CONSOLE) \>= 1), 1) + LDFLAGS += -mconsole +endif + else +ifeq ($(BACKEND),posix) + LDFLAGS += -mconsole +else + LDFLAGS += -mwindows +endif + endif +else + # Haiku (needs to activate the GCC 4x) + ifeq ($(OSTYPE),haiku) +LIBS += -lnetwork -lbe + endif +endif + endif +endif + +ifeq ($(OSTYPE),mingw) + SOURCES += clipboard_w32.cc +else + ifeq ($(BACKEND),SDL2) +SOURCES += clipboard_s.cc + else +SOURCES += clipboard_internal.cc + endif +endif + +LIBS += -lbz2 -lz + +ifdef OPTIMISE + ifeq ($(shell expr $(OPTIMISE) \>= 1), 1) +CFLAGS += -O3 +ifeq ($(findstring $(OSTYPE), amiga),) + ifneq ($(findstring $(CXX), clang),) +CFLAGS += -minline-all-stringops + endif +endif + endif +else + CFLAGS += -O +endif + +ifdef DEBUG + ifndef MSG_LEVEL +MSG_LEVEL = 3 + endif + ifeq ($(shell expr $(DEBUG) \>= 1), 1) +CFLAGS += -g -DDEBUG + endif + ifeq ($(shell expr $(DEBUG) \>= 2), 1) +ifeq ($(shell expr $(PROFILE) \>= 2), 1) + CFLAGS += -fno-inline +endif + endif + ifeq ($(shell expr $(DEBUG) \>= 3), 1) +ifeq ($(shell expr $(PROFILE) \>= 2), 1) + CFLAGS += -O0 +endif + endif +else + CFLAGS += -DNDEBUG +endif + +ifdef MSG_LEVEL + CFLAGS += -DMSG_LEVEL=$(MSG_LEVEL) +endif + +ifdef USE_FREETYPE + ifeq ($(shell expr $(USE_FREETYPE) \>= 1), 1) +CFLAGS += -DUSE_FREETYPE +ifneq ($(FREETYPE_CONFIG),) + CFLAGS += $(shell $(FREETYPE_CONFIG) --cflags) + ifeq ($(shell expr $(STATIC) \>= 1), 1) +LDFLAGS += $(shell $(FREETYPE_CONFIG) --libs --static) + else +LDFLAGS += $(shell $(FREETYPE_CONFIG) --libs) + endif +else + LDFLAGS += -lfreetype + ifeq ($(OSTYPE),mingw) +LDFLAGS += -lpng -lharfbuzz -lgraphite2 + endif +endif +ifeq ($(OSTYPE),mingw) + LDFLAGS += -lfreetype +endif + endif +endif + +ifdef USE_UPNP + ifeq ($(shell expr $(USE_UPNP) \>= 1), 1) +CFLAGS += -DUSE_UPNP +LDFLAGS += -lminiupnpc +ifeq ($(OSTYPE),mingw) + ifeq ($(shell expr $(STATIC) \>= 1), 1) +LDFLAGS += -Wl,-Bdynamic + endif + LDFLAGS += -liphlpapi + ifeq ($(shell expr $(STATIC) \>= 1), 1) +LDFLAGS += -Wl,-Bstatic + endif +endif + endif +endif + +ifeq ($(shell expr $(PROFILE) \>= 1), 1) + CFLAGS += -pg -DPROFILE + ifeq ($(shell expr $(PROFILE) \>= 2), 1) +CFLAGS += -fno-inline -fno-schedule-insns + endif + LDFLAGS += -pg +endif + +ifdef MULTI_THREAD + ifeq ($(shell expr $(MULTI_THREAD) \>= 1), 1) +CFLAGS += -DMULTI_THREAD +ifneq ($(OSTYPE),ha