mirror of
https://github.com/RubyMetric/chsrc.git
synced 2024-11-23 01:10:32 +08:00
Adjust Makefile
This commit is contained in:
parent
fced7d17fb
commit
5a12e65826
9
Makefile
9
Makefile
|
@ -3,11 +3,12 @@
|
||||||
# License : GPLv3
|
# License : GPLv3
|
||||||
# Authors : Aoran Zeng <ccmywish@qq.com>
|
# Authors : Aoran Zeng <ccmywish@qq.com>
|
||||||
# Created on : <2023-08-28>
|
# Created on : <2023-08-28>
|
||||||
# Last modified : <2023-09-06>
|
# Last modified : <2023-09-12>
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
|
|
||||||
CFLAGS = # -Wall
|
CFLAGS = # -Wall
|
||||||
|
|
||||||
|
# 只有Windows会定义该变量
|
||||||
ifeq ($(OS), Windows_NT)
|
ifeq ($(OS), Windows_NT)
|
||||||
CLANG_FLAGS = -target x86_64-pc-windows-gnu
|
CLANG_FLAGS = -target x86_64-pc-windows-gnu
|
||||||
endif
|
endif
|
||||||
|
@ -15,15 +16,13 @@ endif
|
||||||
TARGET = chsrc
|
TARGET = chsrc
|
||||||
#=======================
|
#=======================
|
||||||
|
|
||||||
all: echo
|
all:
|
||||||
ifeq ($(CC), clang)
|
ifeq ($(CC), clang)
|
||||||
@$(CC) chsrc.c $(CLANG_FLAGS) $(CFLAGS) -o $(TARGET)
|
@$(CC) chsrc.c $(CLANG_FLAGS) $(CFLAGS) -o $(TARGET)
|
||||||
else
|
else
|
||||||
@$(CC) chsrc.c $(CFLAGS) -o $(TARGET)
|
@$(CC) chsrc.c $(CFLAGS) -o $(TARGET)
|
||||||
endif
|
endif
|
||||||
|
@echo Compile done using \'$(CC)\' $(CFLAGS)
|
||||||
echo:
|
|
||||||
@echo Compile using \'$(CC)\' $(CFLAGS) on $(OS) ...
|
|
||||||
|
|
||||||
test: $(TARGET)
|
test: $(TARGET)
|
||||||
./$(TARGET) list mirror
|
./$(TARGET) list mirror
|
||||||
|
|
Loading…
Reference in New Issue
Block a user