File tree Expand file tree Collapse file tree 2 files changed +25
-5
lines changed
Expand file tree Collapse file tree 2 files changed +25
-5
lines changed Original file line number Diff line number Diff line change 1+ UNAME := $(shell uname)
2+
3+ ifeq ($(UNAME ) , Linux)
4+ CC = i686-w64-mingw32-gcc
5+ CXX = i686-w64-mingw32-g++
6+ LINK = i686-w64-mingw32-ld
7+ else
18CC = gcc
2- CPP = g++
9+ CXX = g++
310LINK = ld
11+ endif
12+
413CFLAGS = -Wall -g
514LDFLAGS =
615
@@ -10,7 +19,7 @@ DllLoader.exe: $(OBJ)
1019 $(CC ) $(LDFLAGS ) -o DllLoader.exe $(OBJ )
1120
1221% .o : % .cpp
13- $(CPP ) $(CFLAGS ) -c $<
22+ $(CXX ) $(CFLAGS ) -c $<
1423
1524% .o : % .cc
1625 $(CC ) $(CFLAGS ) -c $<
Original file line number Diff line number Diff line change 1- CC = g++
1+ UNAME := $(shell uname)
2+
3+ ifeq ($(UNAME ) , Linux)
4+ CC = i686-w64-mingw32-gcc
5+ CXX = i686-w64-mingw32-g++
6+ LINK = i686-w64-mingw32-ld
7+ else
8+ CC = gcc
9+ CXX = g++
10+ LINK = ld
11+ endif
12+
213CFLAGS = -Wall -g -DSAMPLEDLL_EXPORTS
314LDFLAGS = -shared
415
516OBJ = SampleDLL.o
617
718SampleDLL.dll : $(OBJ )
8- $(CC ) $(LDFLAGS ) -o SampleDLL.dll $(OBJ )
19+ $(LINK ) $(LDFLAGS ) -o SampleDLL.dll $(OBJ )
920
1021% .o : % .cpp
11- $(CC ) $(CFLAGS ) -c $<
22+ $(CXX ) $(CFLAGS ) -c $<
You can’t perform that action at this time.
0 commit comments