File: Makefile.vc

package info (click to toggle)
swirc 3.5.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,988 kB
  • sloc: ansic: 18,321; cpp: 17,795; sh: 968; python: 254; makefile: 104; javascript: 20
file content (160 lines) | stat: -rw-r--r-- 5,572 bytes parent folder | download
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# -*- mode: makefile; -*-

!include options.w32.mk

BUILD_LOG = build.log

# C preprocessor flags
CPPFLAGS = $(CPPFLAGS)\
	-Icurl-$(CURL_VERSION)/include\
	-Ignu-bundle-$(GNU_BUNDLE_DATE)/include\
	-Ihunspell-$(HUNSPELL_VERSION)/include\
	-Ilibressl-$(LIBRESSL_VERSION)/include\
	-Isrc/include

DEST = c:\out\swirc-$(MACHINE)

# Locale location
LOCLOC = LC_MESSAGES\swirc.mo

PRODUCT_VERSION = 3.5.6
REVISION =

all: main

!include src/commands/build.w32.mk
!include src/events/build.w32.mk
!include src/build.w32.mk

!include htmlhelp/build.mk

main: $(TGTS)

.c.obj:
	$(E) ^ ^ CC^ ^ ^ ^ ^ ^ $@
	$(Q) $(CC) $(CFLAGS) $(CPPFLAGS) -c -Fo$*.obj $< 1>>$(BUILD_LOG)

.cpp.obj:
	$(E) ^ ^ CXX^ ^ ^ ^ ^ $@
	$(Q) $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -Fo$*.obj $< 1>>$(BUILD_LOG)

# XXX: Add the MINGW DLLs? (Hunspell)
DIST_DEPS = swirc.exe\
	"curl-$(CURL_VERSION)\$(MACHINE)\libcurl.dll"\
	"gnu-bundle-$(GNU_BUNDLE_DATE)\$(MACHINE)\$(NAME_libcharset).dll"\
	"gnu-bundle-$(GNU_BUNDLE_DATE)\$(MACHINE)\$(NAME_libiconv).dll"\
	"gnu-bundle-$(GNU_BUNDLE_DATE)\$(MACHINE)\$(NAME_libidn).dll"\
	"gnu-bundle-$(GNU_BUNDLE_DATE)\$(MACHINE)\$(NAME_libintl).dll"\
	"hunspell-$(HUNSPELL_VERSION)\$(MACHINE)\$(NAME_libhunspell).dll"\
	"pdcurses-$(PDCURSES_VERSION)\$(MACHINE)\pdcurses.dll"\
	"src\trusted_roots.pem"

dist: $(DIST_DEPS) $(HTMLHELP_DIR)swirc.chm
!	if exists($(DEST))
		rmdir /s /q $(DEST)
!	endif
	mkdir $(DEST)
	mkdir $(DEST)\de\LC_MESSAGES
	mkdir $(DEST)\fi\LC_MESSAGES
	mkdir $(DEST)\fr\LC_MESSAGES
	mkdir $(DEST)\sv\LC_MESSAGES
	copy "curl-$(CURL_VERSION)\$(MACHINE)\libcurl.dll" $(DEST)
	copy "gnu-bundle-$(GNU_BUNDLE_DATE)\$(MACHINE)\$(NAME_libcharset).dll" $(DEST)
	copy "gnu-bundle-$(GNU_BUNDLE_DATE)\$(MACHINE)\$(NAME_libiconv).dll" $(DEST)
	copy "gnu-bundle-$(GNU_BUNDLE_DATE)\$(MACHINE)\$(NAME_libidn).dll" $(DEST)
	copy "gnu-bundle-$(GNU_BUNDLE_DATE)\$(MACHINE)\$(NAME_libintl).dll" $(DEST)
	copy "hunspell-$(HUNSPELL_VERSION)\$(MACHINE)\$(NAME_libhunspell).dll" $(DEST)
	copy "hunspell-$(HUNSPELL_VERSION)\$(MACHINE)\$(DLL_libgcc)" $(DEST)
	copy "hunspell-$(HUNSPELL_VERSION)\$(MACHINE)\$(DLL_libstdcpp)" $(DEST)
	copy "hunspell-$(HUNSPELL_VERSION)\$(MACHINE)\$(DLL_libwinpthread)" $(DEST)
	copy "hunspell-en-us\en_US.aff" $(DEST)
	copy "hunspell-en-us\en_US.dic" $(DEST)
	copy "libressl-$(LIBRESSL_VERSION)\$(MACHINE)\$(DLL_crypto)" $(DEST)
	copy "libressl-$(LIBRESSL_VERSION)\$(MACHINE)\$(DLL_ssl)" $(DEST)
	copy "pdcurses-$(PDCURSES_VERSION)\$(MACHINE)\pdcurses.dll" $(DEST)
	copy "src\trusted_roots.pem" $(DEST)
	copy "swirc.exe" $(DEST)
	copy $(HTMLHELP_DIR)swirc.chm $(DEST)
	copy swirc-locales-$(LOCALES_SNAP)\de\$(LOCLOC) $(DEST)\de\LC_MESSAGES
	copy swirc-locales-$(LOCALES_SNAP)\fi\$(LOCLOC) $(DEST)\fi\LC_MESSAGES
	copy swirc-locales-$(LOCALES_SNAP)\fr\$(LOCLOC) $(DEST)\fr\LC_MESSAGES
	copy swirc-locales-$(LOCALES_SNAP)\sv\$(LOCLOC) $(DEST)\sv\LC_MESSAGES

ALG = SHA256
MSI_ARCH = x64
SIGNTOOL_FLAGS = -f "C:\CERTS\SwircDevelopmentTeam.pfx"\
	-fd $(ALG)\
	-tr "http://timestamp.digicert.com"\
	-td $(ALG)\
	-v

setupfile: dist Swirc.wxs
	signtool sign $(SIGNTOOL_FLAGS) -p "$(PASSWD)" "$(DEST)\$(DLL_libgcc)"
	signtool sign $(SIGNTOOL_FLAGS) -p "$(PASSWD)" "$(DEST)\$(DLL_libstdcpp)"
	signtool sign $(SIGNTOOL_FLAGS) -p "$(PASSWD)" "$(DEST)\$(DLL_libwinpthread)"
	signtool sign $(SIGNTOOL_FLAGS) -p "$(PASSWD)" "$(DEST)\$(NAME_libcharset).dll"
	signtool sign $(SIGNTOOL_FLAGS) -p "$(PASSWD)" "$(DEST)\$(NAME_libhunspell).dll"
	signtool sign $(SIGNTOOL_FLAGS) -p "$(PASSWD)" "$(DEST)\$(NAME_libiconv).dll"
	signtool sign $(SIGNTOOL_FLAGS) -p "$(PASSWD)" "$(DEST)\$(NAME_libidn).dll"
	signtool sign $(SIGNTOOL_FLAGS) -p "$(PASSWD)" "$(DEST)\$(NAME_libintl).dll"
	signtool sign $(SIGNTOOL_FLAGS) -p "$(PASSWD)" "$(DEST)\libcurl.dll"
	signtool sign $(SIGNTOOL_FLAGS) -p "$(PASSWD)" "$(DEST)\$(DLL_crypto)"
	signtool sign $(SIGNTOOL_FLAGS) -p "$(PASSWD)" "$(DEST)\$(DLL_ssl)"
	signtool sign $(SIGNTOOL_FLAGS) -p "$(PASSWD)" "$(DEST)\pdcurses.dll"
	signtool sign $(SIGNTOOL_FLAGS) -p "$(PASSWD)" "$(DEST)\swirc.exe"
	wix build -arch $(MSI_ARCH) -culture "en-us" -ext WixToolset.UI.wixext Swirc.wxs -out "Swirc-$(PRODUCT_VERSION)$(REVISION).msi"
	signtool sign $(SIGNTOOL_FLAGS) -p "$(PASSWD)" \
	    "Swirc-$(PRODUCT_VERSION)$(REVISION).msi"

clean:
	$(E) ^ ^ CLEAN
	$(RM) "*.msi"
	$(RM) "*.wixpdb"
	$(RM) "src\*.obj"
	$(RM) "src\commands\*.obj"
	$(RM) "src\events\*.obj"
	$(RM) "src\trusted_roots.pem"
	$(RM) $(BUILD_LOG)
	$(RM) $(TGTS)
	$(RM) Swirc.wixobj
	$(RM) curl-$(CURL_VERSION).cab
	$(RM) gnu-bundle-$(GNU_BUNDLE_DATE).cab
	$(RM) hunspell-$(HUNSPELL_VERSION).cab
	$(RM) hunspell-en-us.cab
	$(RM) libressl-$(LIBRESSL_VERSION).cab
	$(RM) pdcurses-$(PDCURSES_VERSION).cab
	$(RM) swirc-locales-$(LOCALES_SNAP).cab
	$(RM) swirc.res
!	if exists(cov-int)
		rmdir /s /q cov-int
!	endif
!	if exists(cppcheck-data)
		rmdir /s /q cppcheck-data
!	endif
!	if exists(curl-$(CURL_VERSION))
		rmdir /s /q curl-$(CURL_VERSION)
!	endif
!	if exists(gnu-bundle-$(GNU_BUNDLE_DATE))
		rmdir /s /q gnu-bundle-$(GNU_BUNDLE_DATE)
!	endif
!	if exists(hunspell-$(HUNSPELL_VERSION))
		rmdir /s /q hunspell-$(HUNSPELL_VERSION)
!	endif
!	if exists(hunspell-en-us)
		rmdir /s /q hunspell-en-us
!	endif
!	if exists(libressl-$(LIBRESSL_VERSION))
		rmdir /s /q libressl-$(LIBRESSL_VERSION)
!	endif
!	if exists(pdcurses-$(PDCURSES_VERSION))
		rmdir /s /q pdcurses-$(PDCURSES_VERSION)
!	endif
!	if exists(swirc-locales-$(LOCALES_SNAP))
		rmdir /s /q swirc-locales-$(LOCALES_SNAP)
!	endif
!	if exists(tmp)
		rmdir /s /q tmp
!	endif
	$(Q) cd po
	$(Q) $(MAKE) -f Makefile.vc clean
	$(Q) cd ..