90 lines
2.9 KiB
Makefile
90 lines
2.9 KiB
Makefile
# Make file for Scintilla on Linux or compatible OS
|
|
# Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>
|
|
# The License.txt file describes the conditions under which this software may be distributed.
|
|
# This makefile assumes GCC 4.3 is used and changes will be needed to use other compilers.
|
|
# GNU make does not like \r\n line endings so should be saved to CVS in binary form.
|
|
# Builds for GTK+ 2 and no longer supports GTK+ 1.
|
|
# Also works with ming32-make on Windows.
|
|
|
|
.SUFFIXES: .cxx .c .o .h .a
|
|
ifdef CLANG
|
|
CC = clang
|
|
CCOMP = clang
|
|
else
|
|
CC = g++
|
|
CCOMP = gcc
|
|
endif
|
|
AR = ar
|
|
RANLIB = touch
|
|
|
|
ifndef windir
|
|
ifeq ($(shell uname),Darwin)
|
|
RANLIB = ranlib
|
|
endif
|
|
endif
|
|
|
|
COMPLIB=../bin/scintilla.a
|
|
|
|
vpath %.h ../src ../include
|
|
vpath %.cxx ../src
|
|
|
|
INCLUDEDIRS=-I ../include -I ../src
|
|
CXXBASEFLAGS=-Wall -Wno-missing-braces -Wno-char-subscripts -pedantic -DGTK -DSCI_LEXER $(INCLUDEDIRS)
|
|
|
|
ifdef NOTHREADS
|
|
THREADFLAGS=-DG_THREADS_IMPL_NONE
|
|
else
|
|
THREADFLAGS=
|
|
endif
|
|
|
|
ifdef DEBUG
|
|
CXXFLAGS=-DDEBUG -g $(CXXBASEFLAGS) $(THREADFLAGS)
|
|
else
|
|
CXXFLAGS=-DNDEBUG -Os $(CXXBASEFLAGS) $(THREADFLAGS)
|
|
endif
|
|
|
|
CONFIGFLAGS:=$(shell pkg-config --cflags gtk+-2.0)
|
|
MARSHALLER=scintilla-marshal.o
|
|
|
|
.cxx.o:
|
|
$(CC) $(CONFIGFLAGS) $(CXXFLAGS) -c $<
|
|
.c.o:
|
|
$(CCOMP) $(CONFIGFLAGS) $(CXXFLAGS) -w -c $<
|
|
|
|
#++Autogenerated -- run src/LexGen.py to regenerate
|
|
#**LEXOBJS=\\\n\(\*.o \)
|
|
LEXOBJS=\
|
|
LexAbaqus.o LexAda.o LexAPDL.o LexAsm.o LexAsn1.o LexASY.o LexAU3.o LexAVE.o \
|
|
LexBaan.o LexBash.o LexBasic.o LexBullant.o LexCaml.o LexCLW.o LexCmake.o \
|
|
LexCOBOL.o LexConf.o LexCPP.o LexCrontab.o LexCsound.o LexCSS.o LexD.o \
|
|
LexEiffel.o LexErlang.o LexEScript.o LexFlagship.o LexForth.o LexFortran.o \
|
|
LexGAP.o LexGui4Cli.o LexHaskell.o LexHTML.o LexInno.o LexKix.o LexLisp.o \
|
|
LexLout.o LexLua.o LexMagik.o LexMarkdown.o LexMatlab.o LexMetapost.o \
|
|
LexMMIXAL.o LexMPT.o LexMSSQL.o LexMySQL.o LexNimrod.o LexNsis.o LexOpal.o \
|
|
LexOthers.o LexPascal.o LexPB.o LexPerl.o LexPLM.o LexPOV.o LexPowerPro.o \
|
|
LexPowerShell.o LexProgress.o LexPS.o LexPython.o LexR.o LexRebol.o LexRuby.o \
|
|
LexScriptol.o LexSmalltalk.o LexSML.o LexSorcus.o LexSpecman.o LexSpice.o \
|
|
LexSQL.o LexTACL.o LexTADS3.o LexTAL.o LexTCL.o LexTeX.o LexVB.o LexVerilog.o \
|
|
LexVHDL.o LexYAML.o
|
|
#--Autogenerated -- end of automatically generated section
|
|
|
|
all: $(COMPLIB)
|
|
|
|
clean:
|
|
rm -f *.o $(COMPLIB)
|
|
|
|
deps:
|
|
$(CC) -MM $(CONFIGFLAGS) $(CXXFLAGS) *.cxx ../src/*.cxx | sed -e 's/\/usr.* //' | grep [a-zA-Z] >deps.mak
|
|
|
|
$(COMPLIB): DocumentAccessor.o WindowAccessor.o KeyWords.o StyleContext.o \
|
|
CharClassify.o Decoration.o Document.o PerLine.o CallTip.o \
|
|
ScintillaBase.o ContractionState.o Editor.o ExternalLexer.o PropSet.o PlatGTK.o \
|
|
KeyMap.o LineMarker.o PositionCache.o ScintillaGTK.o CellBuffer.o ViewStyle.o \
|
|
RESearch.o RunStyles.o Selection.o Style.o Indicator.o AutoComplete.o UniConversion.o XPM.o \
|
|
$(MARSHALLER) $(LEXOBJS)
|
|
$(AR) rc $@ $^
|
|
$(RANLIB) $@
|
|
|
|
# Automatically generate header dependencies with "make deps"
|
|
include deps.mak
|