-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (28 loc) · 1.46 KB
/
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
33
34
35
CODE_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
CWD := ${CURDIR}
FUNCTIONS = \
$(CODE_DIR)/build/iocRecord \
$(CODE_DIR)/build/iocDetect \
$(CODE_DIR)/build/entityRecord \
$(CODE_DIR)/build/entityDetect \
$(CODE_DIR)/build/crawlOTX \
$(CODE_DIR)/build/crawlURLHaus
SRC=$(CODE_DIR)/*.go $(CODE_DIR)/pkg/*/*.go
all: build
$(CODE_DIR)/build/iocRecord: $(SRC) $(CODE_DIR)/lambda/iocRecord/*.go
env GOARCH=amd64 GOOS=linux go build -o $(CODE_DIR)/build/iocRecord $(CODE_DIR)/lambda/iocRecord/
$(CODE_DIR)/build/iocDetect: $(SRC) $(CODE_DIR)/lambda/iocDetect/*.go
env GOARCH=amd64 GOOS=linux go build -o $(CODE_DIR)/build/iocDetect $(CODE_DIR)/lambda/iocDetect/
$(CODE_DIR)/build/entityRecord: $(SRC) $(CODE_DIR)/lambda/entityRecord/*.go
env GOARCH=amd64 GOOS=linux go build -o $(CODE_DIR)/build/entityRecord $(CODE_DIR)/lambda/entityRecord/
$(CODE_DIR)/build/entityDetect: $(SRC) $(CODE_DIR)/lambda/entityDetect/*.go
env GOARCH=amd64 GOOS=linux go build -o $(CODE_DIR)/build/entityDetect $(CODE_DIR)/lambda/entityDetect/
$(CODE_DIR)/build/crawlURLHaus: $(SRC) $(CODE_DIR)/lambda/crawlURLHaus/*.go
env GOARCH=amd64 GOOS=linux go build -o $(CODE_DIR)/build/crawlURLHaus $(CODE_DIR)/lambda/crawlURLHaus/
$(CODE_DIR)/build/crawlOTX: $(SRC) $(CODE_DIR)/lambda/crawlOTX/*.go
env GOARCH=amd64 GOOS=linux go build -o $(CODE_DIR)/build/crawlOTX $(CODE_DIR)/lambda/crawlOTX/
build: $(FUNCTIONS)
asset: build
cp $(CODE_DIR)/build/* /asset-output
clean:
rm -f $(FUNCTIONS)