Applied a fix to the NSIS script and modified Makefiles a bit to make
[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 .PHONY: native
14 native:
15         $(MAKE) -f Makefile.mingw MAPC_EXEC=$(MAPC_TARG)
16
17 #-----------------------------------------------------------------------------
18 # NSIS setup stuff
19 #-----------------------------------------------------------------------------
20
21 MAKENSIS= makensis
22 TODOS= todos
23 CP= cp
24
25 TEXT_DOCS= \
26         doc/AUTHORS \
27         doc/MANUAL  \
28         CHANGES     \
29         COPYING     \
30         README
31
32 TXT_DOCS= $(TEXT_DOCS:%=%.txt)
33
34 #-----------------------------------------------------------------------------
35
36 .PHONY: setup
37 setup: install-dlls convert-text-files all
38         $(MAKENSIS) -DVERSION=$(VERSION) -nocd scripts/neverball.nsi
39
40 #-----------------------------------------------------------------------------
41
42 .PHONY: install-dlls
43 install-dlls: install-dlls.sh
44         sh $<
45
46 install-dlls.sh:
47         if ! sh scripts/gen-install-dlls.sh > $@; then \
48             $(RM) $@; \
49             exit 1; \
50         fi
51         @echo --------------------------------------------------------
52         @echo You can probably ignore any file-not-found errors above.
53         @echo Now edit $@ to your needs before restarting make.
54         @echo --------------------------------------------------------
55         @exit 1
56
57 #-----------------------------------------------------------------------------
58
59 .PHONY: convert-text-files
60 convert-text-files: $(TXT_DOCS)
61         find data -name "*.txt" -exec $(TODOS) {} \;
62
63 %.txt: %
64         $(CP) $< $@
65         $(TODOS) $@
66
67 #-----------------------------------------------------------------------------
68