aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 3a15fada08aa750b66313d77c8dcb9f861d9e4b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
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=-t node18-$(PLATFORM)-$(ARCH)
OUTPUT=./build/ak-daemon
SOURCE=./api/index.js
CFLAGS=pkg

all:
    $(CC) $(CFLAGS) $(TARGET) --output $(OUTPUT) $(SOURCE)