Index: Makefile.am
===================================================================
--- Makefile.am	(revision 2c52441d528d3c9973ac9373c0325fe522bab68e)
+++ Makefile.am	(revision b54a36e9b7e412f88420858a291fa64c90adfebe)
@@ -8,7 +8,7 @@
 endif
  
-PACKAGES=$(ALLOC) $(USE_FACTORY) libpolys
+PACKAGES=$(ALLOC) $(USE_FACTORY) libpolys kernel
 
 SUBDIRS=$(PACKAGES)
 
-TESTDIRS=libpolys
+TESTDIRS=libpolys kernel
Index: kernel/makefile
===================================================================
--- kernel/makefile	(revision 2c52441d528d3c9973ac9373c0325fe522bab68e)
+++ kernel/makefile	(revision b54a36e9b7e412f88420858a291fa64c90adfebe)
@@ -35,5 +35,6 @@
 ## compiler and linker options
 ##
-LIBPOLYS_CFLAGS = `sh ../libpolys/libpolys-config --cflags`
+LIBPOLYS_CFLAGS = -I.. -I../libpolys
+LIBPOLYS_LIBS   = -L../factory -L../omalloc -L../libpolys/misc -L../libpolys/reporter -L../libpolys/resources -L../libpolys/coeffs -L../libpolys/polys -lpolys_g -lcoeffs_g -lresources_g -lreporter_g -lmisc_g -lfactory -lomalloc_g
 
 PIPE		= -pipe
@@ -300,7 +301,9 @@
 
 
+test.o: test.cc mod2.h libkernel_g.a  
+	$(CXXG) ${CXXFLAGSG} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSG} -c $< -o $@ 
+
+
 # My headers test
-# test: test.o
-
-test.o: test.cc mod2.h
-	$(CXXG) ${CXXFLAGSG} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSG} -c $< -o $@
+check: test.o
+	$(CXXG) ${CXXFLAGSG} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSG} $< -o test -L. -lkernel_g ${LIBPOLYS_LIBS} -lntl -ldl -lgmp
Index: kernel/test.cc
===================================================================
--- kernel/test.cc	(revision 2c52441d528d3c9973ac9373c0325fe522bab68e)
+++ kernel/test.cc	(revision b54a36e9b7e412f88420858a291fa64c90adfebe)
@@ -1,6 +1,7 @@
 #include <omalloc/omalloc.h>
-
 #include <misc/auxiliary.h>
+
 #include <misc/intvec.h>
+#include <misc/int64vec.h>
 #include <misc/mylimits.h>
 #include <misc/options.h>
@@ -15,6 +16,5 @@
 #include <coeffs/si_gmp.h>
 
-#include <polys/clapconv.h>
-#include <polys/clapsing.h>
+/*
 #include <polys/kbuckets.h>
 #include <polys/matpol.h>
@@ -37,15 +37,20 @@
 #include <polys/nc/summator.h>
 
-#include <polys/operations/pShallowCopyDelete.h>
+//WRONG???/// #include <polys/operations/pShallowCopyDelete.h> // TODO!
 
 #include <polys/templates/p_MemAdd.h>
 #include <polys/templates/p_Procs.h>
 
+// #include <polys/clapconv.h> // factory?
+// #include <polys/clapsing.h>
+*/
+
+
+#ifdef HAVE_FACTORY
+int initializeGMP(){ return 1; } // NEEDED FOR MAIN APP. LINKING!!!
+#endif
+
+/*
 extern ring currRing;
-
-//#ifdef HAVE_FACTORY
-//int initializeGMP(){ return 1; } // NEEDED FOR MAIN APP. LINKING!!!
-//#endif
-
 
 #include <coeffs/numbers.h>
@@ -58,9 +63,8 @@
 
 #include "hutil.h"
-#include "idrec.h"
+//#include "idrec.h" // moved to Singular
 #include "stairc.h"
 #include "ideals.h"
 #include "structs.h"
-#include "int64vec.h"
 #include "syz.h"
 #include "fast_maps.h"
@@ -93,8 +97,6 @@
 #include "gfan.h"
 
-// #include "kutil.h" // ???
-
-
-/* ALL: */
+#include "kutil.h"
+
 
 // #include "CCRing.h" // Too old!
@@ -102,8 +104,8 @@
 #include "digitech.h"
 #include "eigenval.h"
-// #include "F4.h" // uses tgb_internal
-#include "F5cData.h"
+#include "F4.h" // uses tgb_internal
+//#include "F5cData.h"
 #include "f5c.h"
-#include "F5cLists.h"
+//#include "F5cLists.h"
 #include "f5data.h"
 #include "f5gb.h"
@@ -122,7 +124,5 @@
 // #include "Ideal.h" // Too old?
 #include "ideals.h"
-#include "idrec.h"
 #include "IIntvec.h"
-#include "int64vec.h"
 #include "khstd.h"
 #include "kmatrix.h"
@@ -154,5 +154,5 @@
 #include "tgbgauss.h"
 #include "tgb.h"
-// #include "tgb_internal.h" // uses kutil :(
+#include "tgb_internal.h" // uses kutil :(
 #include "timer.h"
 #include "units.h"
@@ -161,11 +161,9 @@
 #include "walkSupport.h"
 
-/* */
-
-
+*/
 
 
 // Sources:
-
+/*
 #include "febase.cc"
 #include "feread.cc"
@@ -291,2 +289,16 @@
 #include "walkProc.cc"
 #include "walkSupport.cc"
+*/
+
+
+
+int main( int, char *argv[] ) 
+{
+  feInitResources(argv[0]);
+
+  StringSetS("ressources in use (as reported by feStringAppendResources(0):\n");
+  feStringAppendResources(0);
+  PrintS(StringAppendS("\n"));
+   
+  return 0;
+}
Index: standalone.test/test.cc
===================================================================
--- standalone.test/test.cc	(revision 2c52441d528d3c9973ac9373c0325fe522bab68e)
+++ standalone.test/test.cc	(revision b54a36e9b7e412f88420858a291fa64c90adfebe)
@@ -166,3 +166,4 @@
   PrintLn();
  
+  return 0;
 }
