Makefile.mingw mods: removed the native target ("make mingw-all WINE="
[neverball] / Makefile.mingw
1 #-----------------------------------------------------------------------------
2
3 EXT= .exe
4 WINE= wine
5
6 include Makefile
7
8 OGL_LIBS= -lm -lopengl32
9 BASE_LIBS= $(LDFLAGS) -lSDL -lSDL_image -lintl
10 LIBS= $(LDFLAGS) $(SDL_LIBS) -lSDL_image -lSDL_mixer -lSDL_ttf \
11         $(OGL_LIBS) $(PNG_LIBS) -lintl
12
13 #-----------------------------------------------------------------------------
14
15 $(SOLS) : install-dlls
16
17 #-----------------------------------------------------------------------------
18
19 MAKENSIS= makensis
20 TODOS= todos
21 FROMDOS= fromdos
22 CP= cp
23
24 TEXT_DOCS= \
25         doc/AUTHORS \
26         doc/MANUAL  \
27         CHANGES     \
28         COPYING     \
29         README
30
31 TXT_DOCS= $(TEXT_DOCS:%=%.txt)
32
33 #-----------------------------------------------------------------------------
34
35 .PHONY: setup
36 setup: install-dlls convert-text-files all
37         $(MAKENSIS) -DVERSION=$(VERSION) -nocd scripts/neverball.nsi
38
39 .PHONY: clean-setup
40 clean-setup: clean
41         $(RM) install-dlls.sh *.dll $(TXT_DOCS)
42         find data -name "*.txt" -exec $(FROMDOS) {} \;
43
44 #-----------------------------------------------------------------------------
45
46 .PHONY: install-dlls
47 install-dlls: install-dlls.sh
48         sh $<
49
50 install-dlls.sh:
51         if ! sh scripts/gen-install-dlls.sh > $@; then \
52             $(RM) $@; \
53             exit 1; \
54         fi
55         @echo --------------------------------------------------------
56         @echo You can probably ignore any file-not-found errors above.
57         @echo Now edit $@ to your needs before restarting make.
58         @echo --------------------------------------------------------
59         @exit 1
60
61 #-----------------------------------------------------------------------------
62
63 .PHONY: convert-text-files
64 convert-text-files: $(TXT_DOCS)
65         find data -name "*.txt" -exec $(TODOS) {} \;
66
67 %.txt: %
68         $(CP) $< $@
69         $(TODOS) $@
70
71 #-----------------------------------------------------------------------------
72