~melchizedek6809/WolkenWelten

ref: e910bd82e598d6f560b8899dd1d88fb3ed554cd3 WolkenWelten/GNUmakefile -rw-r--r-- 2.4 KiB
e910bd82Ben (X13/Arch) Updated contact info 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
ifneq (, $(shell which dash))
	SHELL   := $(shell which dash)
endif

ifeq (, $(wildcard ./common/nujel/LICENSE))
$(error Cant find Nujel, try loading submodules using "git submodule update --init --recursive")
endif

WOLKENWELTEN        := ./wolkenwelten
WOLKENWELTEN_SERVER := ./wolkenwelten-server
NUJEL               := ./common/nujel/nujel
ASSET               := ./tools/assets
ifeq ($(OS),Windows_NT)
	NUJEL               := ./common/nujel/nujel.exe
	ASSET               := ./tools/assets.exe
	WOLKENWELTEN        := ./wolkenwelten.exe
	WOLKENWELTEN_SERVER := ./wolkenwelten-server.exe
endif

AS                   := as
AS_SYM               := NO_SYM=NO_SYM
ASFLAGS              :=

CC                   := cc
CFLAGS               := -g -D_GNU_SOURCE
CSTD                 := -std=c11
OPTIMIZATION         := -O2 -fno-lto -ffast-math -freciprocal-math
WARNINGS             := -Wall -Werror -Wextra -Wshadow -Wcast-align -Wno-missing-braces

LIBS                 :=

RELEASE_OPTIMIZATION := -O3 -flto -ffast-math -freciprocal-math
VERSION_ARCH         := $(shell uname -m)

ifneq (, $(shell which $(NUJEL)))
	VERSION_NAME := $(shell $(NUJEL) tools/tools.nuj -x "[display [infogen-version]]")
endif

all: $(WOLKENWELTEN) $(WOLKENWELTEN_SERVER) $(NUJEL)
.PHONY: all release .deps

 $(NUJEL):
	@$(MAKE) -C common/nujel

include common/disable_implicit_rules.mk
include common/ansi_colors.mk
include common/common.mk
include client/client.mk
include server/server.mk

ifneq ($(MAKECMDGOALS),clean)
-include $(CLIENT_DEPS)
-include $(COMMON_DEPS)
-include $(SERVER_DEPS)
endif

ifeq ($(OS),Windows_NT)
	include platform/win/win.mk
else
	UNAME_S := $(shell uname -s)
	ifeq ($(UNAME_S),Darwin)
		include platform/macos/macos.mk
	endif
	ifeq ($(UNAME_S),Linux)
		include platform/linux/linux.mk
		ifdef MINGWCROSS
			include platform/win_cross/win_cross.mk
		endif
		ifdef OSXCROSS
			include platform/macos_cross/macos_cross.mk
		endif
	endif
	ifeq ($(UNAME_S),Haiku)
		include platform/haiku/haiku.mk
	endif
	ifeq ($(UNAME_S),DragonflyBSD)
		include platform/bsd/bsd.mk
	endif
	ifeq ($(UNAME_S),OpenBSD)
		include platform/bsd/bsd.mk
	endif
	ifeq ($(UNAME_S),NetBSD)
		include platform/bsd/bsd.mk
	endif
	ifeq ($(UNAME_S),FreeBSD)
		include platform/bsd/bsd.mk
	endif
endif

ifdef EMSDK
	include platform/wasm/wasm.mk
endif

ifeq ($(VERSION_ARCH),armv7l)
	LDFLAGS += -march=native
	ASFLAGS += -march=armv7-a -mfloat-abi=hard -mfpu=neon
	CFLAGS  += -march=armv7-a -mfloat-abi=hard -mfpu=neon
endif