# Make file for Scintilla on Mac OS X # Copyright 2002 by Evan Jones # Based on the GTK makefile Copyright 1998-2001 by Neil Hodgson # The License.txt file describes the conditions under which this software may be distributed. # This makefile assumes that Apple's version of GCC 3.1 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. .SUFFIXES: .cxx .c .o .h .a CC = c++ CCOMP = gcc LIBTOOL = libtool GCC_MAJOR := $(shell $(CC) -v 2>&1 | \ grep version | cut -d' ' -f3 | cut -d'.' -f1) # We call it "libscintilla" so when you add it to a Project Builder project, # Project Builder will link it correctly. COMPLIB=../bin/libscintilla.a vpath %.h ../src ../include vpath %.cxx ../src INCLUDEDIRS=-I ../include -I ../src ifeq ($(GCC_MAJOR),3) # 10.4 will have GCC 4 or better, so this should only ever happen # on a 10.3 or older PPC box ARCHFLAGS=-arch ppc -faltivec -mcpu=7400 -mtune=7400 -mpowerpc -mpowerpc-gfxopt else ARCHFLAGS=-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 LDFLAGS=/usr/include/Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 endif OPTIONS=-Wall -Wno-missing-braces -Wno-char-subscripts -DSCI_NAMESPACE -DMACOSX -DSCI_LEXER #DEBUG = 1 ifdef DEBUG DFLAGS=-DDEBUG -g else DFLAGS=-DNDEBUG -Os endif ifdef CONTAINER_HANDLES_EVENTS CONTAINER=-DCONTAINER_HANDLES_EVENTS=1 endif .cxx.o: $(CC) $(CXXFLAGS) $(OPTIONS) $(DFLAGS) $(CONTAINER) $(ARCHFLAGS) $(INCLUDEDIRS) -c $< .c.o: $(CCOMP) $(CXXFLAGS) $(OPTIONS) $(DFLAGS) $(CONTAINER) $(ARCHFLAGS) $(INCLUDEDIRS) -w -c $< #++Autogenerated -- run src/LexGen.py to regenerate #**LEXOBJS=\\\n\(\*.o \) LEXOBJS=\ LexAda.o LexAPDL.o LexAsm.o LexAsn1.o LexAU3.o LexAVE.o LexBaan.o LexBash.o \ LexBasic.o LexBullant.o LexCaml.o LexCLW.o LexCmake.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 LexMatlab.o \ LexMetapost.o LexMMIXAL.o LexMPT.o LexMSSQL.o LexNsis.o LexOpal.o LexOthers.o \ LexPascal.o LexPB.o LexPerl.o LexPLM.o LexPOV.o LexProgress.o LexPS.o \ LexPython.o LexRebol.o LexRuby.o LexScriptol.o LexSmalltalk.o LexSpecman.o \ LexSpice.o LexSQL.o LexTADS3.o LexTCL.o LexTeX.o LexVB.o LexVerilog.o \ LexVHDL.o LexYAML.o #--Autogenerated -- end of automatically generated section # The LEXOBJS have to be treated specially as the functions in them are not called from external code all: $(COMPLIB) $(LEXOBJS) clean: rm -f *.o $(COMPLIB) deps: $(CC) -MM $(CXXFLAGS) *.cxx ../src/*.cxx >deps.mak $(COMPLIB): DocumentAccessor.o WindowAccessor.o KeyWords.o StyleContext.o \ CharClassify.o Decoration.o Document.o CallTip.o PositionCache.o \ ScintillaBase.o ContractionState.o Editor.o ExternalLexer.o PropSet.o PlatMacOSX.o \ KeyMap.o LineMarker.o ScintillaMacOSX.o CellBuffer.o ViewStyle.o \ RESearch.o RunStyles.o Style.o Indicator.o AutoComplete.o UniConversion.o XPM.o \ TCarbonEvent.o TView.o ScintillaCallTip.o \ $(LEXOBJS) $(LIBTOOL) -o $@ $^ # Generate header files from Scintilla.iface ../include/Scintilla_gen.h: ../include/HFacer.py ../include/Face.py ../include/Scintilla.iface cd ../include && python HFacer.py ../include/SciLexer_gen.h: ../include/HFacer.py ../include/Face.py ../include/Scintilla.iface cd ../include && python HFacer.py ../include/Scintilla.h: ../include/Scintilla_gen.h ../include/SciLexer.h: ../include/SciLexer_gen.h # Automatically generate header dependencies with "make deps" include deps.mak