File tree Expand file tree Collapse file tree 2 files changed +19
-11
lines changed
Expand file tree Collapse file tree 2 files changed +19
-11
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ LDFLAGS =
55TARGET ?=
66CXX = $(TARGET ) g++
77
8+ SUFFIX ?=
9+
810ASM_SRC = main.cpp
911ASM_SRC += lexer.cpp
1012ASM_SRC += ast_printer.cpp
@@ -14,14 +16,14 @@ ASM_SRC += parser.cpp
1416ASM_SRC += stmt_string.cpp
1517ASM_OBJ = $(patsubst % .cpp,% .o,$(ASM_SRC ) )
1618ASM_DEP = $(patsubst % .cpp,% .d,$(ASM_SRC ) )
17- ASM_MAIN ?= scu-dsp-asm
19+ ASM_MAIN ?= scu-dsp-asm$( SUFFIX )
1820
1921DIS_SRC = disassemble.cpp
2022DIS_SRC += ast_printer.cpp
2123DIS_SRC += stmt_string.cpp
2224DIS_OBJ = $(patsubst % .cpp,% .o,$(DIS_SRC ) )
2325DIS_DEP = $(patsubst % .cpp,% .d,$(DIS_SRC ) )
24- DIS_MAIN ?= scu-dsp-dis
26+ DIS_MAIN ?= scu-dsp-dis$( SUFFIX )
2527
2628all : $(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 )
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments