type2/tools/makefile

26 lines
697 B
Makefile
Raw Permalink Normal View History

2021-09-19 01:14:32 +02:00
## dirs
2022-03-20 21:46:12 +01:00
dir_lib := lib
dir_source := source
2021-09-19 01:14:32 +02:00
dir_temp := temp
dir_build := build
## commands
cmd_log := echo "--"
cmd_directory_create := mkdir -p
cmd_concatenate := cat
cmd_chmod := chmod
2021-09-19 01:57:25 +02:00
cmd_typescript_compile := tsc --removeComments --lib es2018
2021-09-19 01:14:32 +02:00
## rules
2022-03-20 21:46:12 +01:00
${dir_build}/type2: ${dir_source}/head.js ${dir_lib}/plankton/plankton.js ${dir_temp}/unlinked.js
2021-09-19 01:14:32 +02:00
@ ${cmd_log} "linking …"
@ ${cmd_directory_create} ${dir_build}
@ ${cmd_concatenate} $^ > $@
@ ${cmd_chmod} +x $@
2022-03-20 21:46:12 +01:00
${dir_temp}/unlinked.js: ${dir_lib}/plankton/plankton.d.ts ${dir_source}/base.ts ${dir_source}/type2.ts
2021-09-19 01:14:32 +02:00
@ ${cmd_log} "compiling …"
@ ${cmd_directory_create} ${dir_temp}
@ ${cmd_typescript_compile} $^ --outFile $@