summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorlittleblack111 <jerrylam110209@gmail.com>2023-08-14 09:40:46 +0800
committerlittleblack111 <jerrylam110209@gmail.com>2023-08-14 09:40:46 +0800
commit0a72753d92e7e4ca9875deabb4c654fa11272166 (patch)
tree26a1b51e55d7f1d7cc38290b02bcd60117b47ba4 /Makefile
parent1aece480cc46b03dc1a24f94f22431c033398990 (diff)
updated
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile44
1 files changed, 28 insertions, 16 deletions
diff --git a/Makefile b/Makefile
index f969aea..64040e9 100644
--- a/Makefile
+++ b/Makefile
@@ -6,27 +6,39 @@ MAGENTA=\033[0;35m
YELLOW=\033[0;33m
#PROGRAM NAME
-PROG = setup SchoolCheatTools
+PROG1 = setup.py
+PROG2 = main.py
SRC = $(wildcard *.py)
SPEC = .spec
DIR = $(shell pwd)
FILES = build *.spec
-#COMPILER variable
+#COMPILER variable
CC = pyinstaller
-CFLAGS = --clean --noconfirm# --noconsole & --uac-admin in .spec
+CFLAGS = --clean --noconfirm --noconsole --uac-admin -F
+
#rules and recipes
-cleanspec: compile
- @printf "$(YELLOW)Cleaning ...$(NC)\n"
- @rm -rf $(FILES)
- @if [ $$? -eq 0 ]; then printf "$(MAGENTA)Files $(FILES) are removed successfully\n"; else printf "$(RED)Error: Files $(FILES) are not removed\n"; fi
-
-compile:
- @rm -rf $(PROG) $(PROG).app
- @printf "$(YELLOW)In porcess ... to compile the $(GREEN)$(PROG)${NC}\n"
- $(CC) $(CFLAGS) $(SPEC)
- @printf "$(YELLOW)$(PROG)$(GREEN) compiled successfully${NC}\n"
-
-run: compile
- @./$(PROG)
+all: build cleanspec
+
+cleanspec:
+ @printf "$(YELLOW)Cleaning spec...$(NC)\n"
+ @rm -rf $(FILES)
+ @if [ $$? -eq 0 ]; then printf "$(MAGENTA)Files $(FILES) are removed successfully\n"; else printf "$(RED)Error: Files $(FILES) are not removed\n"; fi
+
+build:
+ @rm -rf $(PROG1) $(PROG1).app
+ @rm -rf $(PROG1) $(PROG2).app
+ @printf "$(YELLOW)In porcess ... to compile the $(GREEN)$(PROG1)${NC}\n"
+ $(CC) $(CFLAGS) $(PROG1)
+ @printf "$(YELLOW)In porcess ... to compile the $(GREEN)$(PROG2)${NC}\n"
+ $(CC) $(CFLAGS) $(PROG2)
+ @printf "$(YELLOW)$(PROG1) $(PROG2)$(GREEN) compiled successfully${NC}\n"
+
+run: build
+ @open ./dist/*
+
+clean: cleanspec
+ @printf "$(YELLOW)Cleaning...$(NC)\n"
+ @rm -rf dist
+ @if [ $$? -eq 0 ]; then printf "$(MAGENTA)Files dist(*) are removed successfully\n"; else printf "$(RED)Error: Files dist(*) are not removed\n"; fi