Skip to content

Commit 47fc5ad

Browse files
committed
release.sh: update
1 parent 72ae017 commit 47fc5ad

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ LDFLAGS =
55
TARGET ?=
66
CXX = $(TARGET)g++
77

8+
SUFFIX ?=
9+
810
ASM_SRC = main.cpp
911
ASM_SRC += lexer.cpp
1012
ASM_SRC += ast_printer.cpp
@@ -14,14 +16,14 @@ ASM_SRC += parser.cpp
1416
ASM_SRC += stmt_string.cpp
1517
ASM_OBJ = $(patsubst %.cpp,%.o,$(ASM_SRC))
1618
ASM_DEP = $(patsubst %.cpp,%.d,$(ASM_SRC))
17-
ASM_MAIN ?= scu-dsp-asm
19+
ASM_MAIN ?= scu-dsp-asm$(SUFFIX)
1820

1921
DIS_SRC = disassemble.cpp
2022
DIS_SRC += ast_printer.cpp
2123
DIS_SRC += stmt_string.cpp
2224
DIS_OBJ = $(patsubst %.cpp,%.o,$(DIS_SRC))
2325
DIS_DEP = $(patsubst %.cpp,%.d,$(DIS_SRC))
24-
DIS_MAIN ?= scu-dsp-dis
26+
DIS_MAIN ?= scu-dsp-dis$(SUFFIX)
2527

2628
all: $(ASM_MAIN) $(DIS_MAIN)
2729

@@ -30,7 +32,7 @@ all: $(ASM_MAIN) $(DIS_MAIN)
3032
%.o: %.cpp
3133
$(CXX) $(CXXFLAGS) -MMD -MF $(basename $<).d -c $< -o $@
3234

33-
$(SRC_MAIN): $(SRC_OBJ)
35+
$(ASM_MAIN): $(ASM_OBJ)
3436
$(CXX) $(STATIC) $(LDFLAGS) $^ -o $@
3537

3638
$(DIS_MAIN): $(DIS_OBJ)

release.sh

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
V=2
2-
M=scu-dsp-asm.$V
3-
4-
make TARGET=x86_64-pc-linux-gnu- MAIN=$M.Linux.x86_64 clean all
5-
make TARGET=aarch64-unknown-linux-gnu- MAIN=$M.Linux.aarch64 clean all
6-
make TARGET=x86_64-w64-mingw32- MAIN=$M.Windows.x86_64.exe clean all
7-
make TARGET=i686-w64-mingw32- MAIN=$M.Windows.i686.exe clean all
8-
#make MAIN=$M.MacOS-Ventura.x86_64 clean all
1+
V=3
2+
3+
make TARGET=x86_64-pc-linux-gnu- SUFFIX=.$V.Linux.x86_64 clean
4+
make TARGET=x86_64-pc-linux-gnu- SUFFIX=.$V.Linux.x86_64 all -j`nproc`
5+
6+
make TARGET=aarch64-unknown-linux-gnu- SUFFIX=.$V.Linux.aarch64 clean
7+
make TARGET=aarch64-unknown-linux-gnu- SUFFIX=.$V.Linux.aarch64 all -j`nproc`
8+
9+
make TARGET=x86_64-w64-mingw32- SUFFIX=.$V.Windows.x86_64.exe clean
10+
make TARGET=x86_64-w64-mingw32- SUFFIX=.$V.Windows.x86_64.exe all -j`nproc`
11+
12+
make TARGET=i686-w64-mingw32- SUFFIX=.$V.Windows.i686.exe clean
13+
make TARGET=i686-w64-mingw32- SUFFIX=.$V.Windows.i686.exe all -j`nproc`
14+
#make SUFFIX=$V.MacOS-Ventura.x86_64 clean all

0 commit comments

Comments
 (0)