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
|
# -*- 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.4
REVISION =
all: main
!include src/commands/build.w32.mk
!include src/events/build.w32.mk
!include src/build.w32.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)
! 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 "pdcurses-$(PDCURSES_VERSION)\$(MACHINE)\pdcurses.dll" $(DEST)
copy "src\trusted_roots.pem" $(DEST)
copy "swirc.exe" $(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
SIGNTOOL_FLAGS = -f "C:\CERTS\SwircDevelopmentTeam.pfx"\
-fd $(ALG)\
-tr "http://timestamp.sectigo.com"\
-td $(ALG)\
-v
setupfile: dist Swirc.wxs
signtool sign $(SIGNTOOL_FLAGS) "$(DEST)\$(DLL_libgcc)"
signtool sign $(SIGNTOOL_FLAGS) "$(DEST)\$(DLL_libstdcpp)"
signtool sign $(SIGNTOOL_FLAGS) "$(DEST)\$(DLL_libwinpthread)"
signtool sign $(SIGNTOOL_FLAGS) "$(DEST)\$(NAME_libcharset).dll"
signtool sign $(SIGNTOOL_FLAGS) "$(DEST)\$(NAME_libhunspell).dll"
signtool sign $(SIGNTOOL_FLAGS) "$(DEST)\$(NAME_libiconv).dll"
signtool sign $(SIGNTOOL_FLAGS) "$(DEST)\$(NAME_libidn).dll"
signtool sign $(SIGNTOOL_FLAGS) "$(DEST)\$(NAME_libintl).dll"
signtool sign $(SIGNTOOL_FLAGS) "$(DEST)\libcurl.dll"
signtool sign $(SIGNTOOL_FLAGS) "$(DEST)\pdcurses.dll"
signtool sign $(SIGNTOOL_FLAGS) "$(DEST)\swirc.exe"
candle Swirc.wxs
light "-cultures:en-us"\
-ext WixUIExtension\
-out "Swirc-$(PRODUCT_VERSION)$(REVISION).msi"\
Swirc.wixobj
signtool sign $(SIGNTOOL_FLAGS)\
"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(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
$(Q) cd po
$(Q) $(MAKE) -f Makefile.vc clean
$(Q) cd ..
|