-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
56 lines (46 loc) · 1.81 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Makefile for Dynamic Notification System
# Variables
GO := go
BUILD_DIR := build
MAIN_FILE := main.go
OUTPUT_BINARY := notification-system
PLUGIN_DIR := plugins
# Targets
.PHONY: all clean build build-plugins
# Default target
all: build build-plugins
# Initialize the Go packages
init:
go mod init dynamic-notification-system
go mod tidy
# Build the main binary
build:
@echo "Building main application..."
$(GO) build -o $(BUILD_DIR)/$(OUTPUT_BINARY) $(MAIN_FILE)
# Build plugins
build-plugins:
go build -buildmode=plugin -o build/plugins/telegram.so plugins/telegram/telegram.go
go build -buildmode=plugin -o build/plugins/discord.so plugins/discord/discord.go
go build -buildmode=plugin -o build/plugins/slack.so plugins/slack/slack.go
go build -buildmode=plugin -o build/plugins/teams.so plugins/teams/teams.go
go build -buildmode=plugin -o build/plugins/webhook.so plugins/webhook/webhook.go
go build -buildmode=plugin -o build/plugins/smtp.so plugins/smtp/smtp.go
go build -buildmode=plugin -o build/plugins/push.so plugins/push/push.go
go build -buildmode=plugin -o build/plugins/sms.so plugins/sms/sms.go
go build -buildmode=plugin -o build/plugins/signal.so plugins/signal/signal.go
go build -buildmode=plugin -o build/plugins/rocketchat.so plugins/rocketchat/rocketchat.go
go build -buildmode=plugin -o build/plugins/ntfy.so plugins/ntfy/ntfy.go
# Clean build artifacts
clean:
@echo "Cleaning build artifacts..."
rm -rf $(BUILD_DIR)
# Help command
help:
@echo "Makefile for Dynamic Notification System"
@echo ""
@echo "Targets:"
@echo " all - Build the main application and plugins"
@echo " init - Initialize the Go packages"
@echo " build - Build the main application"
@echo " build-plugins - Build all plugins"
@echo " clean - Clean all build artifacts"