File: makefile

package info (click to toggle)
codequery 1.0.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 17,860 kB
  • sloc: cpp: 151,420; xml: 16,576; python: 5,602; ansic: 5,487; makefile: 559; perl: 496; ruby: 209; sql: 194; sh: 106; php: 53; vhdl: 51; erlang: 47; objc: 22; lisp: 18; cobol: 18; modula3: 17; asm: 14; fortran: 12; ml: 11; tcl: 6
file content (53 lines) | stat: -rw-r--r-- 1,739 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
# Build gir and test
# For Ubuntu, these may be needed:
#     apt-get install gobject-introspection
#     apt-get install libgirepository1.0-dev
all: Scintilla-0.1.typelib

ifdef GTK3
GTKVERSION=3.0
else
GTKVERSION=2.0
endif

GI_SCANNER = g-ir-scanner
GI_COMPILER = g-ir-compiler
GTK_LIBS = $(shell pkg-config --libs gtk+-$(GTKVERSION))
GTK_CFLAGS = $(shell pkg-config --cflags gtk+-$(GTKVERSION))
PWD = $(shell pwd)

.PHONY: test clean FORCE

../../bin/scintilla.a: FORCE
	$(MAKE) -C ../../gtk all

Scintilla-filtered.h: ../../include/Scintilla.h
	python filter-scintilla-h.py $< > $@

libscintilla.so: ../../bin/scintilla.a
	$(CXX) -shared -o $@ -Wl,--whole-archive $^ -Wl,--no-whole-archive $(GTK_LIBS)

Scintilla-0.1.gir: libscintilla.so Scintilla-filtered.h
	LDFLAGS=-Wl,-rpath=$(shell pwd) \
		$(GI_SCANNER) --no-libtool --warn-all -i Gtk-$(GTKVERSION) -DG_IR_SCANNING -DGTK \
		--cflags-begin $(GTK_CFLAGS) -include gtk/gtk.h \
		-include Scintilla-filtered.h -I../../include --cflags-end \
		--accept-unprefixed \
		--c-include Scintilla.h --c-include ScintillaWidget.h \
		-n Scintilla --nsversion 0.1 --library scintilla -L$(PWD) \
		../../include/Sci_Position.h ../../include/ScintillaWidget.h Scintilla-filtered.h \
		-o $@

Scintilla-0.1.typelib: Scintilla-0.1.gir
	$(GI_COMPILER) $^ -o $@

clean:
	rm -f libscintilla.so Scintilla-0.1.gir Scintilla-0.1.typelib Scintilla-filtered.h
	$(MAKE) -C ../../gtk clean

test: Scintilla-0.1.gir Scintilla-0.1.typelib
	@echo Verifying Scintilla-0.1.gir file
	@diff $<.good $< || (echo "GIR FILE MISMATCH!"; exit 1)
	@echo Launching gi-test.py python program
	GI_TYPELIB_PATH=$(PWD) LD_LIBRARY_PATH=$(PWD) \
		python $(PWD)/gi-test.py