mirror of
https://github.com/RubyMetric/chsrc.git
synced 2024-11-23 01:10:32 +08:00
Move to include
This commit is contained in:
parent
44d9acd6b0
commit
d1da065906
32
Makefile
32
Makefile
|
@ -6,11 +6,11 @@
|
||||||
# Last modified : <2024-05-24>
|
# Last modified : <2024-05-24>
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
|
|
||||||
CFLAGS = # -Wall
|
CFLAGS = -Iinclude # -Wall
|
||||||
|
|
||||||
# 只有Windows会定义该变量
|
# 只有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
|
||||||
ifeq ($(CC), clang)
|
ifeq ($(CC), clang)
|
||||||
CFLAGS += $(CLANG_FLAGS)
|
CFLAGS += $(CLANG_FLAGS)
|
||||||
|
@ -19,30 +19,32 @@ ifeq ($(shell uname), Linux)
|
||||||
CFLAGS += -static
|
CFLAGS += -static
|
||||||
endif
|
endif
|
||||||
|
|
||||||
TARGET = chsrc
|
Target = build/chsrc
|
||||||
|
|
||||||
CI_BUILD_NAME = chsrc
|
CI_Build_Name = chsrc
|
||||||
#=======================
|
#=======================
|
||||||
|
|
||||||
all:
|
all: build_dir
|
||||||
@$(CC) chsrc.c $(CFLAGS) -o $(TARGET)
|
@$(CC) chsrc.c $(CFLAGS) -o $(Target)
|
||||||
@echo; echo Compile done using \'$(CC)\' $(CFLAGS)
|
@echo; echo Compile done using \'$(CC)\' $(CFLAGS)
|
||||||
|
|
||||||
CI: all
|
CI: all
|
||||||
@mv chsrc $(CI_BUILD_NAME)
|
@mv $(Target) $(CI_Build_Name)
|
||||||
|
|
||||||
test: $(TARGET)
|
build_dir:
|
||||||
./$(TARGET) list mirror
|
@mkdir build
|
||||||
./$(TARGET) list target
|
|
||||||
./$(TARGET) get ruby
|
|
||||||
./$(TARGET) get python
|
|
||||||
|
|
||||||
test_xy:
|
test: $(Target)
|
||||||
@mkdir -p build
|
./$(Target) list mirror
|
||||||
|
./$(Target) list Target
|
||||||
|
./$(Target) get ruby
|
||||||
|
./$(Target) get python
|
||||||
|
|
||||||
|
test_xy: build_dir
|
||||||
@$(CC) test/xy.c -o build/xy
|
@$(CC) test/xy.c -o build/xy
|
||||||
@./build/xy
|
@./build/xy
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-@rm *.exe 2>/dev/null
|
-@rm *.exe 2>/dev/null
|
||||||
-@rm $(TARGET) 2>/dev/null
|
-@rm $(Target) 2>/dev/null
|
||||||
-@rm ./build/* 2>/dev/null
|
-@rm ./build/* 2>/dev/null
|
||||||
|
|
Loading…
Reference in New Issue
Block a user