summaryrefslogtreecommitdiffstats
path: root/tools/configure/Makefile.mingw
blob: 086dd71a858c7e74c286077e0f5c211d1a5bf3ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
CORESRC = $(QTSRC)src/corelib
TOOLSRC = $(QTSRC)tools
CONFSRC = $(TOOLSRC)/configure

RAW_PCH       = configure_pch.h
PCH           = $(RAW_PCH).gch/c++
CXX           = g++
DEFINES       = -DUNICODE -DQT_NODLL -DQT_NO_DATASTREAM -DQT_NO_CODECS -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -D_CRT_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DCOMMERCIAL_VERSION
INCPATH       = -I"../../include" -I"../../include/QtCore" -I"../../include/QtCore/$(QTVERSION)" -I"../../include/QtCore/$(QTVERSION)/QtCore" -I"$(TOOLSRC)/shared" -I"$(QTSRC)mkspecs/win32-g++"
CXXFLAGS_BARE = -fno-rtti -fno-exceptions -mthreads -Wall -Wextra $(DEFINES) $(INCPATH)
CXXFLAGS      = -include $(RAW_PCH) $(CXXFLAGS_BARE)
LINK          = g++
LFLAGS        = -Wl,-subsystem,console -mthreads
LIBS          = -lole32 -ladvapi32 -luuid

TARGET        = ../../configure.exe

OBJECTS = \
    main.o \
    configureapp.o \
    environment.o \
    tools.o \
    qbytearray.o \
    qbytearraymatcher.o \
    qhash.o \
    qlist.o \
    qlocale.o \
    qlocale_win.o \
    qlocale_tools.o \
    qvector.o \
    qutfcodec.o \
    qtextcodec.o \
    qglobal.o \
    qnumeric.o \
    qbuffer.o \
    qdatastream.o \
    qdir.o \
    qdiriterator.o \
    qfile.o \
    qfileinfo.o \
    qabstractfileengine.o \
    qfilesystementry.o \
    qfilesystemengine.o \
    qfilesystemengine_win.o \
    qfilesystemiterator_win.o \
    qfsfileengine.o \
    qfsfileengine_win.o \
    qfsfileengine_iterator.o \
    qiodevice.o \
    qtextstream.o \
    qlogging.o \
    qtemporaryfile.o \
    qsystemlibrary.o \
    qbitarray.o \
    qdatetime.o \
    qmap.o \
    qregexp.o \
    qstring.o \
    qstringlist.o \
    qvsnprintf.o \
    qvariant.o \
    qsystemerror.o \
    qurl.o \
    qmetatype.o \
    qmalloc.o \
    qxmlstream.o \
    qxmlutils.o \
    quuid.o \
    qcryptographichash.o \
    registry.o

$(TARGET): $(OBJECTS)
	$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS)

$(OBJECTS): $(PCH)

# SHELL is the full path of sh.exe, unless
# 1) it is found in the current directory
# 2) it is not found at all
# 3) it is overridden on the command line with an existing file
# ... otherwise it is always sh.exe. Specifically, SHELL from the
# environment has no effect.
#
# This check will fail if SHELL is explicitly set to a not
# sh-compatible shell. This is not a problem, because configure.bat
# will not do that.
ifeq ($(SHELL), sh.exe)
    ifeq ($(wildcard $(CURDIR)/sh.exe), )
        SH = 0
    else
        SH = 1
    endif
else
    SH = 1
endif

ifeq ($(SH), 1)
    CHK_DIR_EXISTS = test -d
    CHK_DIR_EXISTS_GLUE = ||
    MKDIR = mkdir -p
else
    CHK_DIR_EXISTS = if not exist
    CHK_DIR_EXISTS_GLUE =
    MKDIR = md
endif

$(PCH): $(CONFSRC)/configure_pch.h
	@$(CHK_DIR_EXISTS) $(RAW_PCH).gch $(CHK_DIR_EXISTS_GLUE) $(MKDIR) $(RAW_PCH).gch
	$(CXX) -x c++-header -c $(CXXFLAGS_BARE) -o $@ $<

VPATH = $(CONFSRC):$(TOOLSRC)/shared/windows:$(CORESRC)/global:$(CORESRC)/kernel:$(CORESRC)/tools:$(CORESRC)/codecs:$(CORESRC)/io:$(CORESRC)/xml:$(CORESRC)/plugin

main.o: $(CONFSRC)/configureapp.h
configureapp.o: $(CONFSRC)/configureapp.h $(CONFSRC)/environment.h $(CONFSRC)/tools.h
environment.o: $(CONFSRC)/environment.h
tools.o: $(CONFSRC)/tools.h

clean:
	-rm -f *.o
	-rm -rf *.gch