Fix building with makefile.win32 from Windows command prompt, not MSYS
[geany-mirror.git] / makefile.win32
blobc31ddcec558c7511645250ca3ddd933d71aee78e
1 # Running make creates config.h then calls the sub makefiles.
3 # Other targets are:
4 #       deps: delete the dependencies so they are regenerated on next make
5 #       clean: clean all generated files
7 # localwin32.mk is an optional file to override make variables.
8 # Use localwin32.mk instead of editing variables as it is included in sub
9 # makefiles.
10 # localwin32.mk to set PREFIX instead of the default C:\libs
11 # For MSYS use localwin32.mk to set CP and RM.
12 # By default this will work in a Windows command prompt.
14 WINDRES = windres.exe
15 CC = gcc
16 CXX = g++
17 CP = copy /Y
18 RM = del
19 MAKE = mingw32-make
20 -include localwin32.mk
22 all: config.h
23         $(MAKE) -C tagmanager/mio -f makefile.win32
24         $(MAKE) -C tagmanager -f makefile.win32
25         $(MAKE) -C scintilla -f makefile.win32
26         $(MAKE) -C plugins -f makefile.win32
27         $(MAKE) -C src -f makefile.win32
29 config.h: win32-config.h
30         $(CP) $< $@
32 deps:
33         -$(RM) tagmanager/mio/deps.mak tagmanager/deps.mak scintilla/deps.mak plugins/deps.mak src/deps.mak
35 # used by src/makefile.win32 to avoid del ../file which is an error
36 clean-local:
37         -$(RM) geany_private.res geany.exe
39 clean: deps
40         $(MAKE) -C tagmanager/mio -f makefile.win32 clean
41         $(MAKE) -C tagmanager -f makefile.win32 clean
42         $(MAKE) -C scintilla -f makefile.win32 clean
43         $(MAKE) -C plugins -f makefile.win32 clean
44         $(MAKE) -C src -f makefile.win32 clean
46 .PHONY: install
47 DESTDIR='C:/Program Files/Geany'
49 # requires admin privileges and MSYS
50 install:
51         cp -r data $(DESTDIR)
52         cp plugins/*.dll $(DESTDIR)/lib
53         cp geany.exe $(DESTDIR)/bin