diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2023-04-02 19:16:48 +0300 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2023-04-02 19:16:48 +0300 |
commit | 1e779e30ef68bbc07fa7a205403d585868dc6b35 (patch) | |
tree | f6c67815e2dc8291dff06cfd4fd43f09ad3a896c /Makefile | |
parent | 52e61043bcb716af42f9fd167aa2bb280bde5b5b (diff) | |
download | arching-kaos-tools-1e779e30ef68bbc07fa7a205403d585868dc6b35.tar.gz arching-kaos-tools-1e779e30ef68bbc07fa7a205403d585868dc6b35.tar.bz2 arching-kaos-tools-1e779e30ef68bbc07fa7a205403d585868dc6b35.zip |
Makefile for the API
Diffstat (limited to 'Makefile')
-rwxr-xr-x | Makefile | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100755 index 0000000..d90b8b7 --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +## +# Compiles the API into `./build/ak-daemon` +CC=`which npx` +PLATFORM=`printf 'const os = require("os");console.log(os.platform())' | node` +ARCH=`printf 'const os = require("os");console.log(os.arch())' | node` +TARGET="--target node18-$(PLATFORM)-$(ARCH)" +OUTPUT="./build/ak-daemon" +SOURCE="./api/index.js" +CFLAGS="pkg" + +all: + $(CC) $(CFLAGS) $(TARGET) --output $(OUTPUT) $(SOURCE) |