type2/tools/makefile
2022-03-20 21:46:12 +01:00

26 lines
697 B
Makefile

## dirs
dir_lib := lib
dir_source := source
dir_temp := temp
dir_build := build
## commands
cmd_log := echo "--"
cmd_directory_create := mkdir -p
cmd_concatenate := cat
cmd_chmod := chmod
cmd_typescript_compile := tsc --removeComments --lib es2018
## rules
${dir_build}/type2: ${dir_source}/head.js ${dir_lib}/plankton/plankton.js ${dir_temp}/unlinked.js
@ ${cmd_log} "linking …"
@ ${cmd_directory_create} ${dir_build}
@ ${cmd_concatenate} $^ > $@
@ ${cmd_chmod} +x $@
${dir_temp}/unlinked.js: ${dir_lib}/plankton/plankton.d.ts ${dir_source}/base.ts ${dir_source}/type2.ts
@ ${cmd_log} "compiling …"
@ ${cmd_directory_create} ${dir_temp}
@ ${cmd_typescript_compile} $^ --outFile $@