Imported Upstream version 7.1
[platform/upstream/dos2unix.git] / mingw32.mak
1 # Author: Erwin Waterlander\r
2 # Copyright (C) 2013-2014 Erwin Waterlander\r
3 # This file is distributed under the same license as the dos2unix package.\r
4 \r
5 # This makefile is for use with MSYS2 and MinGW-w64 target 32 bit (i686)\r
6 # http://sourceforge.net/projects/msys2/\r
7 .PHONY: test check\r
8 \r
9 CC = gcc\r
10 \r
11 # Ruben van Boxem i686-w64-mingw32\r
12 #CRT_GLOB_OBJ = C:/mingw32/i686-w64-mingw32/lib/CRT_glob.o\r
13 \r
14 # MSYS2\r
15 CRT_GLOB_OBJ = /mingw32/i686-w64-mingw32/lib/CRT_glob.o\r
16 \r
17 prefix=c:/usr/local\r
18 ENABLE_NLS=\r
19 \r
20 ifdef ENABLE_NLS\r
21 LIBS_EXTRA = -lintl -liconv\r
22 ZIPOBJ_EXTRA = bin/libintl-8.dll bin/libiconv-2.dll bin/libgcc_s_dw2-1.dll bin/libwinpthread-1.dll\r
23 endif\r
24 LIBS_EXTRA += $(CRT_GLOB_OBJ)\r
25 \r
26 all:\r
27         $(MAKE) all EXE=.exe ENABLE_NLS=$(ENABLE_NLS) LIBS_EXTRA="$(LIBS_EXTRA)" prefix=$(prefix) LINK="cp -f" CC=$(CC) CFLAGS_OS=-I/mingw32/include\r
28 \r
29 test: all\r
30         cd test; $(MAKE) test\r
31 \r
32 check: test\r
33 \r
34 install:\r
35         $(MAKE) install EXE=.exe ENABLE_NLS=$(ENABLE_NLS) LIBS_EXTRA="$(LIBS_EXTRA)" prefix=$(prefix) LINK="cp -f" CC=$(CC) CFLAGS_OS=-I/mingw32/include\r
36 \r
37 uninstall:\r
38         $(MAKE) uninstall EXE=.exe prefix=$(prefix)\r
39 \r
40 clean:\r
41         $(MAKE) clean EXE=.exe ENABLE_NLS=$(ENABLE_NLS) prefix=$(prefix)\r
42 \r
43 mostlyclean:\r
44         $(MAKE) mostlyclean EXE=.exe ENABLE_NLS=$(ENABLE_NLS) prefix=$(prefix)\r
45 \r
46 dist:\r
47         $(MAKE) dist-zip EXE=.exe prefix=$(prefix) VERSIONSUFFIX="-win32" ZIPOBJ_EXTRA="${ZIPOBJ_EXTRA}" ENABLE_NLS=$(ENABLE_NLS)\r
48 \r
49 strip:\r
50         $(MAKE) strip LINK="cp -f" EXE=.exe\r
51 \r