##### Makefile #####
# Make file for bait on Linux or compatible OS
# Released to the public domain 2000 by Neil Hodgson neilh@scintilla.org
# This makefile tested with GCC 3.2 and GNOME 2.0

# ors: helpder so

.SUFFIXES: .c .o .h .a

ifdef GTK3
GTKVERSION=gtk+-3.0
else
GTKVERSION=gtk+-2.0
endif



INCLUDEDIRS=-I../scintilla/include
CXXFLAGS= -DGTK -DSCI_LEXER -W -Wall
LEXEROBJS=$(wildcard ../scintilla/gtk/Lex*.o)

all: so

.c.o:
	gcc -fPIC `pkg-config --cflags $(GTKVERSION)` $(INCLUDEDIRS) $(CXXFLAGS) -c $< -o $@
so: so.o $(LEXEROBJS) ../scintilla/bin/scintilla.a
	gcc -shared -DGTK $^ -o libscintilla.so -lstdc++ `pkg-config --libs $(GTKVERSION) gthread-2.0` -lm -lgmodule-2.0
	#gcc -DGTK $^ -o $@ -lstdc++ `pkg-config --libs $(GTKVERSION) gthread-2.0`	
clean:
	rm -rf so *.o
