This repository was archived by the owner on Aug 31, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +117
-34
lines changed
Expand file tree Collapse file tree 6 files changed +117
-34
lines changed Original file line number Diff line number Diff line change @@ -98,3 +98,8 @@ prebuilt/lib
9898prebuilt /build
9999prebuilt /packaged
100100prebuilt /fetched
101+
102+ # Stamp files and generated C files
103+ # ##################################
104+ stamp-mlc *
105+ _mlc
Original file line number Diff line number Diff line change @@ -185,6 +185,11 @@ revandroid: libexternalv1
185185# MLC Targets
186186
187187.PHONY : lc-compile lc-bootstrap-compile lc-compile-clean
188+ .PHONY : libstdscript
189+
190+ # ######### Standard script library
191+ libstdscript : lc-compile
192+ $(MAKE ) -C ./libscript libstdscript
188193
189194# ######### Compiler
190195lc-compile : libscript libfoundation
@@ -209,9 +214,11 @@ all: server-revdb server-dbodbc server-dbsqlite server-dbmysql server-dbpostgres
209214all : development standalone installer server
210215all : revpdfprinter revandroid
211216all : lc-bootstrap-compile
217+ all : lc-test
212218
213219bootstrap : lc-bootstrap-compile
214220
215221clean :
216222 @rm -r _build/linux _cache/linux
223+ -rm -rf ` find . -type d -name _mlc`
217224clean : lc-compile-clean
Original file line number Diff line number Diff line change 1- NAME = libscript
2- TYPE =archive
1+ all : libscript libstdscript
2+ clean : libstdscript-clean
33
4- include ../rules/environment.linux.makefile
4+ libscript :
5+ $(MAKE ) -f Makefile.libscript libscript
56
6- SOURCES =\
7- module-arithmetic.cpp \
8- module-array.cpp \
9- module-binary.cpp \
10- module-bitwise.cpp \
11- module-byte.cpp \
12- module-char.cpp \
13- module-encoding.cpp \
14- module-file.cpp \
15- module-list.cpp \
16- module-logic.cpp \
17- module-map.cpp \
18- module-math.cpp \
19- module-math_foundation.cpp \
20- module-sort.cpp \
21- module-string.cpp \
22- module-type_convert.cpp \
23- module-type.cpp \
24- module-url.cpp \
25- script-builder.cpp \
26- script-instance.cpp \
27- script-module.cpp \
28- script-object.cpp \
29- script-package.cpp
7+ libstdscript :
8+ $(MAKE ) -f Makefile.libstdscript libstdscript
309
31- CUSTOM_DEFINES =TARGET_PLATFORM_LINUX
32-
33- CUSTOM_INCLUDES =./src ../engine/src
34-
35- CUSTOM_CCFLAGS =-fno-exceptions -fno-rtti
36-
37- include ../rules/archive.linux.makefile
10+ .PHONY : all clean
11+ .PHONY : libscript
12+ .PHONY : libstdscript libstdscript-clean
Original file line number Diff line number Diff line change 1+ # -*-Makefile-*-
2+
3+ NAME ?= libscript
4+ TYPE = archive
5+
6+ include ../rules/environment.linux.makefile
7+
8+ SOURCES += \
9+ module-arithmetic.cpp \
10+ module-array.cpp \
11+ module-binary.cpp \
12+ module-bitwise.cpp \
13+ module-byte.cpp \
14+ module-char.cpp \
15+ module-encoding.cpp \
16+ module-file.cpp \
17+ module-list.cpp \
18+ module-logic.cpp \
19+ module-map.cpp \
20+ module-math.cpp \
21+ module-math_foundation.cpp \
22+ module-sort.cpp \
23+ module-string.cpp \
24+ module-type_convert.cpp \
25+ module-type.cpp \
26+ module-url.cpp \
27+ script-builder.cpp \
28+ script-instance.cpp \
29+ script-module.cpp \
30+ script-object.cpp \
31+ script-package.cpp
32+
33+ CUSTOM_DEFINES =TARGET_PLATFORM_LINUX
34+
35+ CUSTOM_INCLUDES =./src ../engine/src
36+
37+ CUSTOM_CCFLAGS =-fno-exceptions -fno-rtti
38+
39+ include ../rules/archive.linux.makefile
Original file line number Diff line number Diff line change 1+ # -*-Makefile-*-
2+
3+ NAME ?= libstdscript
4+
5+ # Add source code derived from MLC to list of source files
6+ SOURCES += $(MLC_BUILT_SOURCES )
7+
8+ include ../rules/environment.linux.makefile
9+
10+ include ../rules/mlc.linux.makefile
11+
12+ # Inherit almost all settings from libscript
13+ include Makefile.libscript
Original file line number Diff line number Diff line change 1+ # -*-Makefile-*-
2+
3+ # ###############################################################
4+ # MLC
5+ #
6+
7+ # Should have been set to a file containing a list of MLC files to build
8+ MLC_LIST ?= $(NAME ) -modules.list
9+
10+ SRC_DIR ?= ./src
11+ MLC_SRC_DIR = $(SRC_DIR ) /_mlc
12+
13+ LC_COMPILE ?= $(shell PATH=$(BUILD_DIR ) :$(PATH ) \
14+ which lc-compile 2>/dev/null || \
15+ echo "lc-compile" )
16+
17+ MLC_SOURCES = $(shell cat $(MLC_LIST ) | grep -v '^\#')
18+
19+ MLC_BUILT_SOURCES = $(patsubst % .mlc,_mlc/% .c,$(MLC_SOURCES ) )
20+
21+ MLC_STAMP ?= $(MLC_SRC_DIR ) /stamp-mlc-$(NAME )
22+
23+ $(MLC_STAMP ) : $(MLC_SOURCES ) $(MLC_LIST ) $(LC_COMPILE )
24+ mkdir -p $(MODULE_DIR ) $(MLC_SRC_DIR )
25+ @for f in $(MLC_SOURCES ) ; do \
26+ mlcfile=$(SRC_DIR ) /$$ f ; \
27+ cfile=$(MLC_SRC_DIR ) /` echo $$ f | sed -e' s:mlc$$:c:' ` ; \
28+ $(LC_COMPILE ) -modulepath $(MODULE_DIR ) -outputc $$ cfile $$ mlcfile \
29+ || exit $$? ; \
30+ done
31+ touch $@
32+
33+ $(MLC_BUILT_SOURCES ) : $(MLC_STAMP )
34+
35+ # Add MLC-derived files to list of source files to compile
36+ SOURCES += $(MLC_BUILT_SOURCES )
37+
38+ clean : mlc-clean
39+ mlc-clean :
40+ -rm -rf $(MLC_SRC_DIR )
41+
42+ .PHONY : mlc-clean
43+
44+ # ###############################################################
You can’t perform that action at this time.
0 commit comments