-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathmakefile_clang
138 lines (115 loc) · 3.22 KB
/
makefile_clang
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#
# Qt5xHb - Bindings libraries for Harbour/xHarbour and Qt Framework 5
#
# Copyright (c) 2024 Marcos Antonio Gambeta <marcosgambeta AT outlook DOT com>
#
# Makefile for Windows/MSys2/CLang
#
QT_BIN_DIR = $(QTDIR)/bin
QT_INC_DIR = $(QTDIR)/include
QT_LIB_DIR = $(QTDIR)/lib
# Qt Framework modules
include mak/modules1.mak
# check if the module is present in the Qt Framework installation
include mak/modules2.mak
HB_BIN_DIR = $(HBDIR)/bin
HB_INC_DIR = $(HBDIR)/include
QT5XHB_INC_DIR = include
QT5XHB_OBJ_DIR = obj/$(QTPLATFORM)/$(QTCOMP)
QT5XHB_LIB_DIR = lib/$(QTPLATFORM)/$(QTCOMP)
QT5XHB_SRC_DIR = source
OBJEXT = .o
LIBEXT = .a
LIBPRE = lib
HB = $(HB_BIN_DIR)/harbour
# PRGFLAGS
PRGFLAGS = -n -w3 -gc3
ifeq ($(HBCOMP),xharbour)
PRGFLAGS = -n -w2
endif
# PRGINCLUDES
PRGINCLUDES = -I$(QT5XHB_INC_DIR) -I$(HB_INC_DIR)
CC = clang++
# CFLAGS
CFLAGS =
# Qt 5.7.x require C++11
ifneq (,$(findstring 5.7,$(shell qmake -v)))
CFLAGS += -std=c++11
endif
# Qt 5.8.x require C++11
ifneq (,$(findstring 5.8,$(shell qmake -v)))
CFLAGS += -std=c++11
endif
# Qt 5.9.x require C++11
ifneq (,$(findstring 5.9,$(shell qmake -v)))
CFLAGS += -std=c++11
endif
# Qt 5.10.x require C++11
ifneq (,$(findstring 5.10,$(shell qmake -v)))
CFLAGS += -std=c++11
endif
# Qt 5.11.x require C++11
ifneq (,$(findstring 5.11,$(shell qmake -v)))
CFLAGS += -std=c++11
endif
# Qt 5.12.x require C++11
ifneq (,$(findstring 5.12,$(shell qmake -v)))
CFLAGS += -std=c++11
endif
# Qt 5.13.x require C++11
ifneq (,$(findstring 5.13,$(shell qmake -v)))
CFLAGS += -std=c++11
endif
# Qt 5.14.x require C++11
ifneq (,$(findstring 5.14,$(shell qmake -v)))
CFLAGS += -std=c++11
endif
# Qt 5.15.x require C++11
ifneq (,$(findstring 5.15,$(shell qmake -v)))
CFLAGS += -std=c++11
endif
CFLAGS += -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE
CFLAGS += -DQT_DLL
CFLAGS += -DQT_NO_DEBUG
CFLAGS += -DQT_THREAD_SUPPORT
# ative a linha abaixo para compilar sem checagem de parametros
# CFLAGS += -DQT5XHB_DONT_CHECK_PARAMETERS
include mak/modules3.mak
# CINCLUDES
CINCLUDES =
CINCLUDES += -I$(QT_INC_DIR)
ifneq ($(wildcard $(QT_INC_DIR)/QtANGLE/.*),)
CINCLUDES += -I$(QT_INC_DIR)/QtANGLE
endif
include mak/modules4.mak
CINCLUDES += -I$(QT5XHB_INC_DIR)
CINCLUDES += -I$(QT5XHB_SRC_DIR)
CINCLUDES += -I$(HB_INC_DIR)
LINK = llvm-ar
LFLAGS = rc
MOC = $(QT_BIN_DIR)/moc
MOCFLAGS =
MOCFLAGS += -DQT_NO_DEBUG
include mak/modules5.mak
MOCINCLUDES =
MOCINCLUDES += -I$(QT_INC_DIR)
include mak/modules6.mak
# include mak/*.mak
include mak/modules7.mak
OBJECTS_QTCORE += $(QT5XHB_OBJ_DIR)/events$(OBJEXT)
OBJECTS_QTCORE += $(QT5XHB_OBJ_DIR)/signals$(OBJEXT)
OBJECTS_QTCORE += $(QT5XHB_OBJ_DIR)/dummy$(OBJEXT)
OBJECTS_QTCORE += $(QT5XHB_OBJ_DIR)/version$(OBJEXT)
OBJECTS_QTCORE += $(QT5XHB_OBJ_DIR)/utils$(OBJEXT)
OBJECTS_QTCORE += $(QT5XHB_OBJ_DIR)/qtdefs$(OBJEXT)
# ALLLIBS
ALLLIBS =
include mak/modules8.mak
all: $(ALLLIBS)
LINK_CMD = $(LINK) $(LFLAGS) $@ $^
HB_CMD = $(HB) $(PRGFLAGS) $(PRGINCLUDES) -o$@ $^
CC_CMD = $(CC) $(CFLAGS) $(CINCLUDES) -o $@ $^
include mak/rules1.mak
include mak/rules2.mak
# include mak/*Mocs.mak
include mak/modules9.mak