-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
32 lines (28 loc) · 829 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
.PHONY: install test compile clean
PROGRAM_NAME := extract-jsonpaths
PLATFORM ?= linux
RUN_TESTS ?= true
compile: clean
npm install .
ifeq ($(RUN_TESTS), true)
$(MAKE) test
endif
node --experimental-sea-config sea-config.json
cp $(shell command -v node) $(PROGRAM_NAME)
chmod 755 $(PROGRAM_NAME)
ifeq ($(PLATFORM), darwin)
codesign --remove-signature $(PROGRAM_NAME)
npx postject $(PROGRAM_NAME) NODE_SEA_BLOB sea-prep.blob \
--sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 \
--macho-segment-name NODE_SEA
codesign --sign - $(PROGRAM_NAME)
else
npx postject $(PROGRAM_NAME) NODE_SEA_BLOB sea-prep.blob \
--sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2
endif
clean:
rm -rf node_modules
rm -f package-lock.json
rm -f sea-prep.blob
rm -f $(PROGRAM_NAME)
.DEFAULT_GOAL := compile