I'm working on that right now
I'm faceing quite a few hoops to jump through, so far I've got a makefile and a function with the code from 'bait' in it, all links fine, just trying to workout how to remove the dependancy on main()
some background info:
scintilla.a is just an archive of .o files, scintilla.a can be importanted into purebasic eash enough, but of course it's going to need aditional code for the commands to access that infomation, or I could be leading you down the garden path here.
I'll keep you posted.
Code: Select all
# PureBasic Scintilla makefile
#
##############################################################################
# Make Veriables #
##############################################################################
# Suffixes (old fashioned acording to the Make Manual 2002 June)
.SUFFIXES: .c .o .h .a
##############################################################################
# Veriables #
##############################################################################
# compiler options
COMPILEROPTIMIZE = -O3
CXXFLAGS= -DGTK -DSCI_LEXER -W -Wall
# includes
INCLUDE = src_scintilla.h
INCLUDEDIRS=-I../scintilla/include
# output
OUTPUTOBJS = src_scintilla.o
OUTPUTOBJARCH = src_scintilla.a
OUTPUTPUREBASICLIB = /usr/share/purebasic/purelibraries/scintilla
# paths
SCINTILLALIBA=../scintilla/bin/scintilla.a
LEXEROBJECTS=$(wildcard ../scintilla/gtk/Lex*.o)
##############################################################################
# Compiling / Linking #
##############################################################################
# Call default rule
all: src_scintilla
# The default rule for suffix .c / .o
.c.o:
gcc `pkg-config --cflags gtk+-2.0` $(INCLUDEDIRS) $(CXXFLAGS) $(COMPILEROPTIMIZE) -c $< -o $@
# Link
src_scintilla: $(OUTPUTOBJS) $(LEXEROBJECTS) $(SCINTILLALIBA)
gcc `pkg-config --libs gtk+-2.0 gthread-2.0` $(COMPILEROPTIMIZE) -lstdc++ -DGTK $^ -o $@
cp $(SCINTILLALIBA) ./src_scintilla.a
ar rvs $(OUTPUTOBJARCH) *.o
pblibrarymaker src_scintilla.desc /TO ./
##############################################################################
# Restoration #
##############################################################################
clean:
rm *.o *.a
rm src_scintilla
cleanpurelibs:
rm /usr/share/purebasic/purelibraries/scintilla
install:
cp src_scintilla $(OUTPUTPUREBASICLIB)
there is the current make file
