Skip to content

Commit 203d940

Browse files
committedSep 13, 2015
make file initial version
make files for command line build using GCC and MinGW
1 parent 2f2e440 commit 203d940

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed
 

‎make.cmd

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
set path=%path%;%MINGW_HOME%\bin
2+
mkdir bin
3+
mingw32-make.exe -f makefile.mgw BUILD=all
4+
pause

‎makefile.mgw

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# makefile for Windows & MinGW
2+
3+
CFLAGS = -Wall -O0 -std=c++11 -g -Wl,--subsystem,console
4+
CC = mingw32-g++.exe
5+
6+
INCLUDE_PATHS = -I.\include
7+
#LINKER_FLAGS = -lmingw32
8+
LINKER_FLAGS =
9+
10+
TARGET_NAME =xnode_test
11+
OBJ_LIST = xnode_test.o
12+
13+
all: clean $(TARGET_NAME).exe clean_build
14+
15+
xnode_test.exe: $(OBJ_LIST)
16+
$(CC) $(LINKER_FLAGS) -o $(TARGET_NAME).exe $(OBJ_LIST)
17+
18+
xnode_test.o: test\xnode_test.cpp
19+
$(CC) $(CFLAGS) -c test\xnode_test.cpp $(INCLUDE_PATHS)
20+
21+
clean:
22+
del *.o
23+
24+
clean_build:
25+
del *.o
26+
copy $(TARGET_NAME).exe bin\$(TARGET_NAME).exe
27+
del $(TARGET_NAME).exe
28+

0 commit comments

Comments
 (0)
Please sign in to comment.