plugins: Replace geany_plugin_register() pdata with a separate API function
[geany-mirror.git] / scintilla / gtk / makefile.win32
blob12cedc3ae5c20b44cb62703f431909177db6a28f
1 # Make file for Scintilla on Linux or compatible OS
2 # Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>
3 # The License.txt file describes the conditions under which this software may be distributed.
4 # This makefile assumes GCC 4.3 is used and changes will be needed to use other compilers.
5 # GNU make does not like \r\n line endings so should be saved to CVS in binary form.
6 # Builds for GTK+ 2 and no longer supports GTK+ 1.
7 # Also works with ming32-make on Windows.
9 .SUFFIXES: .cxx .c .o .h .a
10 CXX = g++
11 CC = gcc
12 AR = ar
14 ifdef GTK3
15 GTKVERSION=gtk+-3.0
16 else
17 GTKVERSION=gtk+-2.0
18 endif
20 RANLIB = ranlib
21 PREFIX = C:/libs
22 RM = del
23 -include ../../localwin32.mk
25 ifdef MSYS
26 RM = rm -f
27 endif
29 COMPLIB=../scintilla.a
31 vpath %.h ../src ../include ../lexlib
32 vpath %.cxx ../src ../lexlib ../lexers
34 INCLUDEDIRS=-I ../include -I ../src -I ../lexlib
35 CXXBASEFLAGS=-Wall -Wno-missing-braces -Wno-char-subscripts -DGTK -DSCI_LEXER $(INCLUDEDIRS) \
36         -DGEANY_EXPORT_SYMBOL="__declspec(dllexport)" \
37         -DGEANY_API_SYMBOL=GEANY_EXPORT_SYMBOL
39 ifdef THREADS
40 THREADFLAGS=
41 else
42 THREADFLAGS=-DG_THREADS_IMPL_NONE
43 endif
46 ifdef DEBUG
47 CTFLAGS=-DDEBUG -g -O0 $(CXXBASEFLAGS) $(THREADFLAGS)
48 else
49 CTFLAGS=-DNDEBUG -Os $(CXXBASEFLAGS) $(THREADFLAGS)
50 endif
52 CFLAGS:=$(CTFLAGS)
53 CXXTFLAGS:=--std=c++0x $(CTFLAGS) $(REFLAGS)
55 CONFIGFLAGS:=$(shell pkg-config --cflags $(GTKVERSION))
56 MARSHALLER=scintilla-marshal.o
58 .cxx.o:
59         $(CXX) $(CONFIGFLAGS) $(CXXTFLAGS) $(CXXFLAGS) -c $<
60 .c.o:
61         $(CC) $(CONFIGFLAGS) $(CFLAGS) -w -c $<
63 LEXOBJS:=$(addsuffix .o,$(basename $(notdir $(wildcard ../lexers/Lex*.cxx))))
65 all: $(COMPLIB)
67 clean:
68         -$(RM) deps.mak *.o $(COMPLIB) *.plist
70 deps.mak:
71         $(CXX) -MM $(CONFIGFLAGS) $(CXXTFLAGS) *.cxx ../src/*.cxx ../lexlib/*.cxx ../lexers/*.cxx >deps.mak
73 $(COMPLIB): Accessor.o CharacterSet.o LexerBase.o LexerModule.o LexerSimple.o StyleContext.o WordList.o \
74         CharClassify.o Decoration.o Document.o PerLine.o Catalogue.o CallTip.o CaseConvert.o CaseFolder.o \
75         ScintillaBase.o ContractionState.o EditModel.o Editor.o EditView.o ExternalLexer.o MarginView.o \
76         PropSetSimple.o PlatGTK.o \
77         KeyMap.o LineMarker.o PositionCache.o ScintillaGTK.o CellBuffer.o CharacterCategory.o ViewStyle.o \
78         RESearch.o RunStyles.o Selection.o Style.o Indicator.o AutoComplete.o UniConversion.o XPM.o \
79         $(MARSHALLER) $(LEXOBJS)
80         $(AR) rc $@ $^
81         $(RANLIB) $@
83 # Generate header dependencies with "make deps.mak"
84 include deps.mak