-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (43 loc) · 1.15 KB
/
Copy pathMakefile
File metadata and controls
55 lines (43 loc) · 1.15 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
###############################
# Variables
###############################
SHELL := C:\Windows\System32\cmd.exe
PYTHON := py -3
CURRENT_DIR := .
SOURCE_DIR := .\src
RELEASE_DIR := .\Release
PACKAGE_DIR := .\artifacts
PROJECT_NAME := TradeSkillReagents
###############################
# Utility functions
###############################
# Deletes directory if it exists
# $1 Directory to delete
define delete_dir
@if EXIST $1 rmdir $1 /s /q;
endef
# Creates a directory if it does not exist
# $! Directory to create
define make_dir
@if NOT EXIST $1 mkdir $1;
endef
###############################
# Make rules
###############################
.DEFAULT_GOAL := build
.PHONY: clean
clean:
$(call delete_dir,$(RELEASE_DIR))
.PHONY: build
build: clean
$(call make_dir,$(RELEASE_DIR))
$(PYTHON) .\scripts\build.py $(CURRENT_DIR) $(PROJECT_NAME)
.PHONY: test-classic
test-classic: build
$(PYTHON) .\scripts\deploy-classic.py $(RELEASE_DIR) $(PROJECT_NAME)
.PHONY: test-bcc
test-bcc: build
$(PYTHON) .\scripts\deploy-bcc.py $(RELEASE_DIR) $(PROJECT_NAME)
# .PHONY: test-retail
# test-retail: build
# $(PYTHON) .\scripts\deploy-retail.py $(RELEASE_DIR) $(PROJECT_NAME)