From 0a72753d92e7e4ca9875deabb4c654fa11272166 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Mon, 14 Aug 2023 09:40:46 +0800 Subject: updated --- Makefile | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) (limited to 'Makefile') 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 -- cgit v1.2.3