Skip to content

Commit 75c1401

Browse files
committed
Add build task for make
1 parent b9e7937 commit 75c1401

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

Makefile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
# --------------------------------------------------------------
33
# SPDX-License-Identifier: GPL-3.0-or-later
44
# --------------------------------------------------------------
5-
# Build File : Makefile
5+
# Build File : Makefile
66
# File Authors : Aoran Zeng <[email protected]>
77
# Contributors : Yangmoooo <[email protected]>
88
# | sanchuanhehe <[email protected]>
99
# |
1010
# Created On : <2023-08-28>
11-
# Last Modified : <2025-06-19>
11+
# Last Modified : <2025-06-20>
1212
# --------------------------------------------------------------
1313

1414
On-Linux = 0
@@ -63,24 +63,25 @@ ifeq ($(MAKECMDGOALS), CI)
6363
endif
6464
#=======================
6565

66+
all: build
6667

67-
all:
68+
build:
6869
ifeq ($(STATIC), 1)
6970
CFLAGS += -static
7071
endif
7172

72-
all:
73+
build:
7374
@echo "Starting: Compile chsrc executable"
7475
@$(CC) src/chsrc-main.c $(CFLAGS) $(_C_Warning_Flags) -o $(Target-Name)
7576
@echo Finished: Compile chsrc executable using \'$(CC)\' $(CFLAGS)
7677

77-
CI: all
78+
CI: build
7879
@mv $(Target-Name) $(CI_ARTIFACT_NAME)
7980

8081

8182
debug: CFLAGS += -g
8283
debug: Target-Name = $(Debuggable-Target-Name)
83-
debug: all
84+
debug: build
8485
@$(DEBUGGER) $(Debuggable-Target-Name)
8586

8687
test: test-make-env test-xy test-fw
@@ -140,4 +141,4 @@ install: $(Target-Name)
140141
install -D -m 755 $(Target-Name) $(DESTDIR)/usr/bin/$(Target-Name)
141142
install -D -m 644 doc/chsrc.1 $(DESTDIR)/usr/share/man/man1/chsrc.1
142143

143-
.PHONY: all CI debug check test test-make-env test-xy test-fw fastcheck test-cli clean install build-deb clean-deb
144+
.PHONY: all build CI debug check test test-make-env test-xy test-fw fastcheck test-cli clean install build-deb clean-deb

0 commit comments

Comments
 (0)