aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2012-12-04 19:28:27 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2012-12-04 22:07:08 +0100
commit655b527827fc2b64b374a1d29e884e92269e9cae (patch)
tree297d795ef625973990066bdc21f25c291596e8e8 /src
parentd8a316514c03d85b771a9dce4a8a51b875d955b3 (diff)
downloadsciteco-655b527827fc2b64b374a1d29e884e92269e9cae.tar.gz
first working version of autotools based build-system
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am54
-rw-r--r--src/cmdline.cpp4
-rw-r--r--src/expressions.cpp4
-rw-r--r--src/goto.cpp4
-rw-r--r--src/interface-gtk.cpp4
-rw-r--r--src/interface-ncurses.cpp8
-rw-r--r--src/main.cpp4
-rw-r--r--src/parser.cpp4
-rw-r--r--src/qregisters.cpp4
-rw-r--r--src/rbtree.cpp4
-rw-r--r--src/ring.cpp4
-rw-r--r--src/sciteco.h5
-rw-r--r--src/search.cpp4
-rw-r--r--src/symbols.cpp4
-rw-r--r--src/undo.cpp4
15 files changed, 106 insertions, 9 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..9836c9a
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,54 @@
+AM_CFLAGS = -Wall -std=c99
+AM_CXXFLAGS = -Wall
+AM_CPPFLAGS =
+if NEED_COMPAT
+AM_CPPFLAGS += -I@top_srcdir@/compat
+endif
+
+BUILT_SOURCES = symbols-scintilla.cpp symbols-scilexer.cpp
+
+EXTRA_DIST = gtk-info-popup.gob \
+ symbols-extract.tes
+
+noinst_PROGRAMS = sciteco-minimal
+sciteco_minimal_SOURCES = main.cpp sciteco.h \
+ cmdline.cpp \
+ undo.cpp undo.h \
+ expressions.cpp expressions.h \
+ qregisters.cpp qregisters.h \
+ ring.cpp ring.h \
+ parser.cpp parser.h \
+ search.cpp search.h \
+ goto.cpp goto.h \
+ rbtree.cpp rbtree.h \
+ symbols.cpp symbols.h \
+ interface.h
+
+if INTERFACE_GTK
+
+BUILT_SOURCES += gtk-info-popup.c \
+ gtk-info-popup.h gtk-info-popup-private.h
+
+sciteco_minimal_SOURCES += interface-gtk.cpp interface-gtk.h \
+ gtk-info-popup.c
+
+else
+
+sciteco_minimal_SOURCES += interface-ncurses.cpp interface-ncurses.h
+
+endif
+
+bin_PROGRAMS = sciteco
+sciteco_SOURCES = $(sciteco_minimal_SOURCES) \
+ symbols-scintilla.cpp symbols-scilexer.cpp
+
+%.c %.h %-private.h : %.gob
+ @GOB2@ $<
+
+symbols-scintilla.cpp : @SCINTILLA_PATH@/include/Scintilla.h \
+ sciteco-minimal symbols-extract.tes
+ ./sciteco-minimal -m symbols-extract.tes $< $@ "SCI_" scintilla
+
+symbols-scilexer.cpp : @SCINTILLA_PATH@/include/SciLexer.h \
+ sciteco-minimal symbols-extract.tes
+ ./sciteco-minimal -m symbols-extract.tes $< $@ "SCLEX_,SCE_" scilexer
diff --git a/src/cmdline.cpp b/src/cmdline.cpp
index 212722a..8d7a3a1 100644
--- a/src/cmdline.cpp
+++ b/src/cmdline.cpp
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <string.h>
#include <stdlib.h>
diff --git a/src/expressions.cpp b/src/expressions.cpp
index ac06b43..6d7a2e5 100644
--- a/src/expressions.cpp
+++ b/src/expressions.cpp
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <glib.h>
#include "sciteco.h"
diff --git a/src/goto.cpp b/src/goto.cpp
index 7af5152..05714a8 100644
--- a/src/goto.cpp
+++ b/src/goto.cpp
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <glib.h>
#include <glib/gprintf.h>
diff --git a/src/interface-gtk.cpp b/src/interface-gtk.cpp
index 7515b2f..cac776f 100644
--- a/src/interface-gtk.cpp
+++ b/src/interface-gtk.cpp
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdarg.h>
#include <glib.h>
diff --git a/src/interface-ncurses.cpp b/src/interface-ncurses.cpp
index 0e08914..7166a52 100644
--- a/src/interface-ncurses.cpp
+++ b/src/interface-ncurses.cpp
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <string.h>
#include <stdio.h>
#include <stdarg.h>
@@ -8,10 +12,6 @@
#include <glib/gstdio.h>
#include <curses.h>
-/* only a hack until we have Autoconf checks */
-#if defined(__PDCURSES__) && CHTYPE_LONG >= 2
-#define PDCURSES_WIN32A
-#endif
#include <Scintilla.h>
#include <ScintillaTerm.h>
diff --git a/src/main.cpp b/src/main.cpp
index 4526da3..c2af75a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
diff --git a/src/parser.cpp b/src/parser.cpp
index 5ba96fa..870695d 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdarg.h>
#include <string.h>
diff --git a/src/qregisters.cpp b/src/qregisters.cpp
index 06947f7..dfe20a0 100644
--- a/src/qregisters.cpp
+++ b/src/qregisters.cpp
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <string.h>
#include <bsd/sys/queue.h>
diff --git a/src/rbtree.cpp b/src/rbtree.cpp
index 28df67b..f8f5c36 100644
--- a/src/rbtree.cpp
+++ b/src/rbtree.cpp
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <bsd/sys/tree.h>
#include "rbtree.h"
diff --git a/src/ring.cpp b/src/ring.cpp
index f1b051b..292f86c 100644
--- a/src/ring.cpp
+++ b/src/ring.cpp
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <limits.h>
#include <stdlib.h>
#include <string.h>
diff --git a/src/sciteco.h b/src/sciteco.h
index 88ab109..bb98415 100644
--- a/src/sciteco.h
+++ b/src/sciteco.h
@@ -5,11 +5,6 @@
#include "interface.h"
-/* Autoconf-like */
-#define PACKAGE_VERSION "0.1"
-#define PACKAGE_NAME "SciTECO"
-#define PACKAGE_STRING PACKAGE_NAME " " PACKAGE_VERSION
-
namespace Flags {
enum {
ED_HOOKS = (1 << 5)
diff --git a/src/search.cpp b/src/search.cpp
index 701f36c..3f0d80d 100644
--- a/src/search.cpp
+++ b/src/search.cpp
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <string.h>
#include <glib.h>
diff --git a/src/symbols.cpp b/src/symbols.cpp
index c05d153..dd85faf 100644
--- a/src/symbols.cpp
+++ b/src/symbols.cpp
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <string.h>
#include <glib.h>
diff --git a/src/undo.cpp b/src/undo.cpp
index 8072540..4ed825c 100644
--- a/src/undo.cpp
+++ b/src/undo.cpp
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdio.h>
#include <string.h>
#include <bsd/sys/queue.h>