1 # Make file for Scintilla on Linux or compatible OS
\r
2 # Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
\r
3 # The License.txt file describes the conditions under which this software may be distributed.
\r
4 # This makefile assumes GCC 3.1 is used and changes will be needed to use other compilers.
\r
5 # GNU make does not like \r\n line endings so should be saved to CVS in binary form.
\r
6 # Builds for GTK+ 2 if available else GTK+ 1.
\r
7 # To force GTK+ 2 build, define GTK2 on the make command line.
\r
8 # To force GTK+ 1 build, define GTK1 on the make command line.
\r
10 .SUFFIXES: .cxx .c .o .h .a
\r
16 ifeq ($(shell uname),Darwin)
\r
20 COMPLIB=../bin/scintilla.a
\r
22 vpath %.h ../src ../include
\r
25 INCLUDEDIRS=-I ../include -I ../src
\r
26 CXXBASEFLAGS=-Wall -Wno-missing-braces -Wno-char-subscripts -pedantic -Os -DGTK -DSCI_LEXER $(INCLUDEDIRS)
\r
29 THREADFLAGS=-DG_THREADS_IMPL_NONE
\r
35 CXXFLAGS=-DDEBUG -g $(CXXBASEFLAGS) $(THREADFLAGS)
\r
37 CXXFLAGS=-DNDEBUG -Os $(CXXBASEFLAGS) $(THREADFLAGS)
\r
40 # If explicit setting of GTK1 or GTK2 then use that else look for
\r
41 # pkg-config which is an OK indication that GTK2 is available
\r
43 CONFIGFLAGS=$(shell pkg-config --cflags gtk+-2.0)
\r
44 MARSHALLER=scintilla-marshal.o
\r
47 CONFIGFLAGS=$(shell gtk-config --cflags)
\r
49 ifneq (,$(findstring /,$(shell whereis pkg-config)))
\r
50 CONFIGFLAGS=$(shell pkg-config --cflags gtk+-2.0)
\r
51 MARSHALLER=scintilla-marshal.o
\r
53 CONFIGFLAGS=$(shell gtk-config --cflags)
\r
59 $(CC) $(CONFIGFLAGS) $(CXXFLAGS) -c $<
\r
61 $(CCOMP) $(CONFIGFLAGS) $(CXXFLAGS) -w -c $<
\r
63 #++Autogenerated -- run src/LexGen.py to regenerate
\r
64 #**LEXOBJS=\\\n\(\*.o \)
\r
66 LexAbaqus.o LexAda.o LexAPDL.o LexAsm.o LexAsn1.o LexASY.o LexAU3.o LexAVE.o \
\r
67 LexBaan.o LexBash.o LexBasic.o LexBullant.o LexCaml.o LexCLW.o LexCmake.o \
\r
68 LexConf.o LexCPP.o LexCrontab.o LexCsound.o LexCSS.o LexD.o LexEiffel.o \
\r
69 LexErlang.o LexEScript.o LexFlagship.o LexForth.o LexFortran.o LexGAP.o \
\r
70 LexGui4Cli.o LexHaskell.o LexHTML.o LexInno.o LexKix.o LexLisp.o LexLout.o \
\r
71 LexLua.o LexMagik.o LexMatlab.o LexMetapost.o LexMMIXAL.o LexMPT.o LexMSSQL.o \
\r
72 LexMySQL.o LexNsis.o LexOpal.o LexOthers.o LexPascal.o LexPB.o LexPerl.o \
\r
73 LexPLM.o LexPOV.o LexPowerShell.o LexProgress.o LexPS.o LexPython.o LexR.o \
\r
74 LexRebol.o LexRuby.o LexScriptol.o LexSmalltalk.o LexSpecman.o LexSpice.o \
\r
75 LexSQL.o LexTADS3.o LexTCL.o LexTeX.o LexVB.o LexVerilog.o LexVHDL.o LexYAML.o
\r
76 #--Autogenerated -- end of automatically generated section
\r
81 rm -f *.o $(COMPLIB)
\r
84 $(CC) -MM $(CONFIGFLAGS) $(CXXFLAGS) *.cxx ../src/*.cxx | sed -e 's/\/usr.* //' | grep [a-zA-Z] >deps.mak
\r
86 $(COMPLIB): DocumentAccessor.o WindowAccessor.o KeyWords.o StyleContext.o \
\r
87 CharClassify.o Decoration.o Document.o CallTip.o \
\r
88 ScintillaBase.o ContractionState.o Editor.o ExternalLexer.o PropSet.o PlatGTK.o \
\r
89 KeyMap.o LineMarker.o PositionCache.o ScintillaGTK.o CellBuffer.o ViewStyle.o \
\r
90 RESearch.o RunStyles.o Style.o Indicator.o AutoComplete.o UniConversion.o XPM.o \
\r
91 $(MARSHALLER) $(LEXOBJS)
\r
95 # Automatically generate header dependencies with "make deps"
\r