Skip to content

Commit c9abe26

Browse files
committed
Linux now builds into linux/i386 or linux/x86_64 folders depending on host system architecture.
Environment makefile now defines ARCH to be i386 or x86_64 depending on host system architecture. Environment makefile now defines PREBUILT_LIB_DIR to be appropriate based on host system architecture. Added include of environment makefile to all project makefiles. Linking of final targets with stdc++ is now automatically determined (x64 dynamically, i386 statically). Added referencing comments (x64) to stride fixes and operator new signature. Made top-level clean rule only remove 'linux' sub-folder. Linker scripts for installer and standalone renamed to reflect architecture.
2 parents aa60822 + 8864ff8 commit c9abe26

55 files changed

Lines changed: 692 additions & 144 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
###############################################################################
22
# Engine Targets
33

4-
LBITS := $(shell getconf LONG_BIT)
5-
64
.PHONY: libopenssl liburlcache libstubs
75
.PHONY: libexternal libexternalv1 libz libjpeg libpcre libpng libplugin libcore
86
.PHONY: revsecurity libgif
97
.PHONY: kernel development standalone webruntime webplugin webplayer server
10-
.PHONY: standalone32
118
.PHONY: kernel-standalone kernel-development kernel-server
129
.PHONY: libireviam onrev-server
1310

@@ -37,6 +34,9 @@ libopenssl:
3734

3835
libcore:
3936
$(MAKE) -C ./libcore libcore
37+
38+
revsecurity:
39+
$(MAKE) -C ./thirdparty/libopenssl -f Makefile.revsecurity revsecurity
4040

4141
kernel: libz libgif libjpeg libpcre libpng libopenssl libexternal libcore
4242
$(MAKE) -C ./engine -f Makefile.kernel libkernel
@@ -50,23 +50,13 @@ kernel-development: kernel
5050
kernel-server:
5151
$(MAKE) -C ./engine -f Makefile.kernel-server libkernel-server
5252

53-
development: libz libgif libjpeg libpcre libpng libopenssl libexternal libcore kernel kernel-development
53+
development: libz libgif libjpeg libpcre libpng libopenssl libexternal libcore kernel kernel-development revsecurity
5454
$(MAKE) -C ./engine -f Makefile.development engine-community
5555

56-
standalone: libz libgif libjpeg libpcre libpng libopenssl libcore kernel revsecurity kernel-standalone
56+
standalone: libz libgif libjpeg libpcre libpng libopenssl libcore kernel revsecurity kernel-standalone revsecurity
5757
$(MAKE) -C ./engine -f Makefile.standalone standalone-community
5858

59-
ifeq ($(LBITS),64)
60-
standalone32: libz libgif libjpeg libpcre libpng libopenssl libcore kernel revsecurity kernel-standalone
61-
rm -rf _cache
62-
$(MAKE) -C ./engine -f Makefile.standalone32 standalone32-community
63-
#else
64-
#standalone32: libz libgif libjpeg libpcre libpng libopenssl libcore kernel revsecurity kernel-standalone
65-
# rm -rf _cache
66-
# $(MAKE) -C ./engine64 -f Makefile.standalone standalone64 -m64
67-
endif
68-
69-
installer: libz libgif libjpeg libpcre libpng libopenssl libexternal libcore kernel
59+
installer: libz libgif libjpeg libpcre libpng libopenssl libexternal libcore kernel revsecurity
7060
$(MAKE) -C ./engine -f Makefile.installer installer
7161

7262
server: libz libgif libjpeg libpcre libpng libopenssl libexternal libcore kernel kernel-server revsecurity
@@ -186,9 +176,6 @@ all: revpdfprinter revandroid
186176
all: revdb dbodbc dbsqlite dbmysql dbpostgresql
187177
all: server-revdb server-dbodbc server-dbsqlite server-dbmysql server-dbpostgresql
188178
all: development standalone installer server
189-
ifeq ($(LBITS),64)
190-
all: standalone32
191-
endif
192179

193180
clean:
194-
@rm -r _build _cache
181+
@rm -r _build/linux _cache/linux

engine/Makefile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: engine standalone standalone32 runtime kernel newruntime server kernel-standalone kernel-development kernel-server
1+
.PHONY: engine standalone runtime kernel newruntime server kernel-standalone kernel-development kernel-server
22

33
kernel:
44
$(MAKE) -f Makefile.kernel libkernel
@@ -18,9 +18,6 @@ engine: kernel kernel-development
1818
standalone: kernel kernel-standalone
1919
$(MAKE) -f Makefile.standalone standalone-community
2020

21-
standalone32: kernel kernel-standalone
22-
$(MAKE) -f Makefile.standalone32 standalone32-community
23-
2421
installer: kernel
2522
$(MAKE) -f Makefile.installer installer
2623

@@ -31,8 +28,6 @@ clean:
3128
$(MAKE) -f Makefile.development clean
3229
$(MAKE) -f Makefile.installer clean
3330
$(MAKE) -f Makefile.standalone clean
34-
$(MAKE) -f Makefile.standalone32 clean
3531
$(MAKE) -f Makefile.runtime clean
3632
$(MAKE) -f Makefile.kernel clean
3733
$(MAKE) -f Makefile.server clean
38-

engine/Makefile.common

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@ CUSTOM_INCLUDES=\
1212
./src \
1313
$(MODE_INCLUDES)
1414

15-
CUSTOM_DEPS= libkernel.a libcore.a libpng.a libpcre.a libjpeg.a $(MODE_DEPS)
15+
CUSTOM_DEPS= libkernel.a libcore.a libpng.a libpcre.a libjpeg.a libopenssl.a $(MODE_DEPS)
1616

1717
CUSTOM_LIBS=$(MODE_LIBS) kernel core z gif png pcre jpeg openssl
18-
CUSTOM_STATIC_LIBS=stdc++ $(MODE_STATIC_LIBS)
18+
CUSTOM_STATIC_LIBS=$(MODE_STATIC_LIBS)
1919
CUSTOM_DYNAMIC_LIBS=dl X11 m Xext pthread $(MODE_DYNAMIC_LIBS)
2020

2121
CUSTOM_CCFLAGS=\
22-
-Wall -Wno-unused-variable -Wno-switch -Wno-non-virtual-dtor -fno-exceptions -fno-rtti \
22+
-Wall -Wno-unused-variable -Wno-switch -Wno-non-virtual-dtor -Wno-parentheses \
23+
-fno-exceptions -fno-rtti \
2324
-fmessage-length=0 \
2425
$(MODE_CCFLAGS)
2526

engine/Makefile.development

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
NAME=engine-community
22
TYPE=application
33

4+
include ../rules/environment.linux.makefile
5+
46
MODE_SOURCES= \
57
stacksecurity.cpp \
68
deploysecurity.cpp \

engine/Makefile.installer

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
NAME=installer
22
TYPE=application
33

4+
include ../rules/environment.linux.makefile
5+
46
MODE_SOURCES= \
57
lextable.cpp minizip.cpp mode_installer.cpp mode_installer_lnx.cpp bsdiff_apply.cpp
68

79
MODE_DEFINES=\
810
MODE_INSTALLER
9-
11+
1012
MODE_LDFLAGS=\
11-
-Wl,--script=installer.link
13+
-Wl,--script=installer-$(ARCH).link
1214

1315
include Makefile.common

engine/Makefile.kernel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
NAME=libkernel
22
TYPE=archive
33

4+
include ../rules/environment.linux.makefile
5+
46
SOURCES=\
57
aclip.cpp block.cpp button.cpp buttondraw.cpp card.cpp cardlst.cpp \
68
cdata.cpp chunk.cpp cmds.cpp cmdsc.cpp cmdse.cpp cmdsf.cpp \
@@ -51,8 +53,6 @@ linuxstubs.cpp: src/linux.stubs
5153
include/revbuild.h: include/revbuild.h.in ../version
5254
../prebuilt/bin/Revolution.lnx "./encode_version.rev" "./"
5355

54-
include ../rules/environment.linux.makefile
55-
5656
$(CACHE_DIR)/mcstring.o: include/revbuild.h
5757

5858
include Makefile.kernel-common

engine/Makefile.kernel-common

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
CUSTOM_DEFINES=\
32
LINUX \
43
X11 TARGET_PLATFORM_LINUX TARGET_PLATFORM_POSIX \

engine/Makefile.kernel-development

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
NAME=libkernel-development
22
TYPE=archive
33

4+
include ../rules/environment.linux.makefile
5+
46
SOURCES= \
57
ide.cpp internal_development.cpp lextable.cpp mode_development.cpp \
68
deploy.cpp deploy_linux.cpp deploy_windows.cpp \
@@ -16,6 +18,6 @@ src/hashedstrings.cpp: src/lextable.cpp
1618
encodederrors.cpp: src/executionerrors.h src/parseerrors.h
1719
../prebuilt/bin/Revolution.lnx "./encode_errors.rev" "./src" "./src/encodederrors.cpp"
1820

19-
../_cache/linux/$(MODE)/$(NAME)/ide.o: src/hashedstrings.cpp
21+
$(CACHE_DIR)/ide.o: src/hashedstrings.cpp
2022

2123
include Makefile.kernel-common

engine/Makefile.kernel-server

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
NAME=libkernel-server
22
TYPE=archive
33

4+
include ../rules/environment.linux.makefile
5+
46
SOURCES=\
57
aclip.cpp block.cpp button.cpp buttondraw.cpp card.cpp cardlst.cpp \
68
cdata.cpp chunk.cpp cmds.cpp cmdsc.cpp cmdse.cpp cmdsf.cpp \
@@ -61,8 +63,6 @@ linuxstubs.cpp: src/linux.stubs
6163
encodederrors.cpp: src/executionerrors.h src/parseerrors.h
6264
../prebuilt/bin/Revolution.lnx "./encode_errors.rev" "./src" "./src/encodederrors.cpp"
6365

64-
include ../rules/environment.linux.makefile
65-
6666
$(CACHE_DIR)/mcstring.o: include/revbuild.h
6767

6868
include ../rules/archive.linux.makefile

engine/Makefile.kernel-standalone

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
NAME=libkernel-standalone
22
TYPE=archive
33

4+
include ../rules/environment.linux.makefile
5+
46
SOURCES= \
57
lextable.cpp mode_standalone.cpp
68

0 commit comments

Comments
 (0)