aboutsummaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2012-11-23 16:02:19 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2012-11-23 16:02:19 +0100
commit0e536bd36250419698fe884d01d5997581241d93 (patch)
treec0022c625937a45cd4afee1e6f2ddd49b0634f07 /Makefile
parentf1accae89b8aa9247932ed8bbb46f07e03e1aa7a (diff)
system for looking up static symbols
* symbols are extracted from C header files by a TECO macro * macro is executed using a "minimal" version of SciTECO that does not include symbols (uses gcc's weak symbols) * the generated C++ code contains the symbol-name-to-define mapping as a constant sorted array and initializes the appropriate SymbolList object * a symbol lookup is super fast using a simple binary search in the symbol lists * except for object initialization, no there's no overhead for keeping the symbol lists! * build process is complicated by introduction of bootstrapping via sciteco-minimal
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 15 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index a65b860..361f966 100644
--- a/Makefile
+++ b/Makefile
@@ -53,13 +53,22 @@ ifneq ($(findstring MINGW32,$(OS)),)
CPPFLAGS+=-Icompat
endif
+MINIMAL_OBJS:=main.o cmdline.o undo.o expressions.o qbuffers.o \
+ parser.o goto.o rbtree.o symbols.o \
+ interface.a
+
all : sciteco
-sciteco : main.o cmdline.o undo.o expressions.o qbuffers.o \
- parser.o goto.o rbtree.o \
- interface.a
+sciteco : $(MINIMAL_OBJS) symbols-scintilla.o
+ $(CXX) -o $@ $^ $(LDFLAGS)
+
+sciteco-minimal : $(MINIMAL_OBJS)
$(CXX) -o $@ $^ $(LDFLAGS)
+symbols-scintilla.cpp : $(SCI_DIR)/include/Scintilla.h \
+ sciteco-minimal symbols-extract.tes
+ ./sciteco-minimal -m symbols-extract.tes $< $@ SCI_ scintilla
+
ifeq ($(INTERFACE),GTK)
interface.a : interface-gtk.o gtk-info-popup.o
@@ -82,5 +91,6 @@ install: all
$(INSTALL) sciteco $(PREFIX)/bin
clean:
- $(RM) sciteco *.o *.a *.exe
- $(RM) gtk-info-popup*.[ch]
+ $(RM) sciteco sciteco-minimal
+ $(RM) *.o *.a *.exe
+ $(RM) gtk-info-popup*.[ch] symbols-*.cpp