File: makefile.win32

package info (click to toggle)
geany 1.24.1%2Bdfsg-1~bpo70%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 22,436 kB
  • sloc: ansic: 78,644; cpp: 49,969; sh: 11,816; vhdl: 5,924; cs: 1,236; makefile: 1,019; f90: 537; sql: 501; fortran: 387; php: 241; python: 165; asm: 131; java: 127; perl: 118; ruby: 109; erlang: 63; xml: 56; ada: 48; lisp: 48; tcl: 41; cobol: 25; pascal: 15
file content (71 lines) | stat: -rw-r--r-- 1,882 bytes parent folder | download | duplicates (2)
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
# See http://www.geany.org/Support/BuildingOnWin32
# Running make creates config.h then calls the sub makefiles.
#
# Other targets are:
#	clean: clean all generated files
#	install: install to DESTDIR
#
# localwin32.mk is an optional file to override make variables.
# Use localwin32.mk instead of editing variables as it is included in sub
# makefiles.
# For MSYS set MSYS=1.
# By default this should work in a Windows command prompt (cmd.exe).

WINDRES = windres.exe
CC = gcc
CXX = g++
CP = copy /y
RM = del
MKDIR = mkdir
# $/ is used as a portable directory separator
# strip is used to prevent line wrap
/ := $(strip \)
DESTDIR = C:/Program Files/Geany
-include localwin32.mk

ifdef MSYS
CP = cp
RM = rm -f
/ = /
endif

all: config.h
	$(MAKE) -C tagmanager/ctags -f makefile.win32
	$(MAKE) -C tagmanager/mio -f makefile.win32
	$(MAKE) -C tagmanager/src -f makefile.win32
	$(MAKE) -C scintilla -f makefile.win32
	$(MAKE) -C plugins -f makefile.win32
	$(MAKE) -C src -f makefile.win32

config.h: win32-config.h
	$(CP) $< $@

# used by src/makefile.win32 to avoid del ../file which is an error
clean-local:
	-$(RM) geany_private.res geany.exe

clean:
	$(MAKE) -C tagmanager/ctags -f makefile.win32 clean
	$(MAKE) -C tagmanager/mio -f makefile.win32 clean
	$(MAKE) -C tagmanager/src -f makefile.win32 clean
	$(MAKE) -C scintilla -f makefile.win32 clean
	$(MAKE) -C plugins -f makefile.win32 clean
	$(MAKE) -C src -f makefile.win32 clean

.PHONY: all clean clean-local install

# likely requires admin privileges
# mkdir output is ignored in case dir exists
# 'copy' seems to only accept / in the destination
install:
	-$(MKDIR) "$(DESTDIR)"
	-$(MKDIR) "$(DESTDIR)/bin"
	$(CP) geany.exe "$(DESTDIR)/bin"
	-$(MKDIR) "$(DESTDIR)/lib"
	$(CP) plugins$/*.dll "$(DESTDIR)/lib"
	-$(MKDIR) "$(DESTDIR)/data"
ifdef MSYS
	cp -r data "$(DESTDIR)"
else
	xcopy /s /y data "$(DESTDIR)/data"
endif