File tree Expand file tree Collapse file tree 4 files changed +12
-20
lines changed
Expand file tree Collapse file tree 4 files changed +12
-20
lines changed Original file line number Diff line number Diff line change 1- GCC_MACHINE =$(shell gcc -dumpmachine)
1+ GCC_MACHINE =$(shell $( CXX ) -dumpmachine)
22$(info "-- GCC_MACHINE = ${GCC_MACHINE}")
33OS =$(shell uname -s | sed 's/[^A-Za-z1-9].* //')
44$(info "-- OS = ${OS}")
@@ -25,11 +25,11 @@ OBJ=$(basename $(SRC)).o
2525LIB =$(basename $(SRC ) ) .$(LSFX )
2626
2727$(LIB ) : $(OBJ )
28- $(LD ) $(SOFLAGS ) $(OUTOPT )$(LIB ) $(OBJ ) $(LDFLAGS )
28+ $(CXX ) $(SOFLAGS ) $(OUTOPT )$(LIB ) $(OBJ ) $(LDFLAGS )
2929 @echo " Try make test"
3030
3131$(OBJ ) : $(SRC )
32- $(CC ) $(CFLAGS ) -DCOMPILE_LIB -c $(SRC ) $(OBJOPT )$(OBJ )
32+ $(CXX ) $(CFLAGS ) -DCOMPILE_LIB -c $(SRC ) $(OBJOPT )$(OBJ )
3333
3434clean :
3535 rm -f $(LIB ) $(OBJ )
Original file line number Diff line number Diff line change 1- CC = c++
1+ CXX ? = c++
22CFLAGS = -O2 -falign-functions=4 -DCygwin -I$(EUSDIR)/include
33LDFLAGS =
44OBJOPT = -o
55OUTOPT = -o
6- LD = c++ -shared -falign-functions=4
7- EXELD = c++ -falign-functions=4
8- SOFLAGS =
6+ SOFLAGS = -shared -falign-functions=4
97EXESFX = .exe
108LSFX = dll
119LPFX = lib
Original file line number Diff line number Diff line change 1- CC = c++
1+ CXX ? = c++
22CFLAGS = -O2 -falign-functions=8 -fPIC -DDarwin -DGCC -I$(EUSDIR)/include
33LDFLAGS =
44OBJOPT = -o
55OUTOPT = -o
6- LD = c++
76SOFLAGS = -dynamiclib -flat_namespace -undefined suppress
8- EXELD = c++
97EXESFX =
108LSFX = so
119LPFX = lib
Original file line number Diff line number Diff line change 1- CC = c++
1+ CXX ? = c++
22CFLAGS = -O2 -DLinux -DGCC -I$(EUSDIR)/include
33LDFLAGS =
44OBJOPT = -o
55OUTOPT = -o
6- LD = c++
76SOFLAGS = -shared
8- EXELD = c++
97EXESFX =
108LSFX = so
119LPFX = lib
1210
13- ifneq (,$(findstring 64,$(shell gcc -dumpmachine)))
11+ ifneq (,$(findstring 64,$(shell $(CXX) -dumpmachine)))
1412 CFLAGS+=-falign-functions=8
1513else
1614 CFLAGS+=-falign-functions=4
1715endif
1816
19- ifneq ($(shell gcc -dumpmachine | egrep "^(arm|aarch)"),)
17+ ifneq ($(shell $(CXX) -dumpmachine | egrep "^(arm|aarch)"),)
2018 LDFLAGS+=-Wl,-z,execstack
2119 CFLAGS+=-DARM -fPIC
2220endif
23- ifneq ($(shell gcc -dumpmachine | grep "^x86_64"),)
21+ ifneq ($(shell $(CXX) -dumpmachine | grep "^x86_64"),)
2422 CFLAGS+=-fPIC
2523endif
2624
27- ifneq ($(shell gcc -dumpmachine | grep "i.*86-linux"),)
28- CC += -m32
29- LD += -m32
30- EXELD += -m32
25+ ifneq ($(shell $(CXX) -dumpmachine | grep "i.*86-linux"),)
26+ CXX += -m32
3127endif
3228
3329
You can’t perform that action at this time.
0 commit comments