home: hub: 9ficl

Download patch

ref: 916333342c07e4259c5daa5abbd74ead9cdb3714
parent: 10cf2349e0b78f0b4f76779b31f5367f8b8af472
author: asau <asau@ficl.sf.net>
date: Mon Oct 25 04:54:38 CDT 2010

Generate softcore.c while building.

--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,10 @@
+SRCDIR=	.
+VPATH=	$(SRCDIR):$(SRCDIR)/softcore
+# core:
 OBJECTS= dictionary.o system.o fileaccess.o float.o double.o prefix.o search.o softcore.o stack.o tools.o vm.o primitives.o bit.o lzuncompress.o unix.o utility.o hash.o callback.o word.o extras.o
 HEADERS= ficl.h ficlplatform/unix.h
+# soft core:
+SOURCES = softcore.fr ifbrack.fr prefix.fr ficl.fr jhlocal.fr marker.fr oo.fr classes.fr string.fr ficllocal.fr fileaccess.fr
 #
 # Flags for shared library
 SHFLAGS = -fPIC
@@ -39,6 +44,10 @@
 unix.o: ficlplatform/unix.c $(HEADERS)
 	$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
 
+# generate softcore source
+softcore.c: $(SOURCES)
+	(cd softcore && exec $(MAKE) softcore.c) && cp softcore/softcore.c .
+
 #
 #       generic object code
 #
@@ -57,3 +66,4 @@
 #
 clean:
 	rm -f *.o *.a libficl.* ficl
+	rm -f softcore.c softcore/softcore.c
--- a/Makefile.ansi
+++ b/Makefile.ansi
@@ -1,5 +1,10 @@
+SRCDIR=	.
+VPATH=	$(SRCDIR):$(SRCDIR)/softcore
+# core:
 OBJECTS= dictionary.o system.o fileaccess.o float.o double.o prefix.o search.o softcore.o stack.o tools.o vm.o primitives.o bit.o lzuncompress.o ansi.o utility.o hash.o callback.o word.o extras.o
 HEADERS= ficl.h ficlplatform/ansi.h
+# soft core:
+SOURCES = softcore.fr ifbrack.fr prefix.fr ficl.fr jhlocal.fr marker.fr oo.fr classes.fr string.fr ficllocal.fr fileaccess.fr
 #
 # Flags for shared library
 TARGET=  -ansi -DFICL_ANSI  # riscos MOTO_CPU32 
@@ -36,6 +41,10 @@
 ansi.o: ficlplatform/ansi.c $(HEADERS)
 	$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ ficlplatform/ansi.c
 
+# generate softcore source
+softcore.c: $(SOURCES)
+	(cd softcore && exec $(MAKE) softcore.c) && cp softcore/softcore.c .
+
 #
 #       generic object code
 #
@@ -54,3 +63,4 @@
 #
 clean:
 	rm -f *.o *.a libficl.*
+	rm -f softcore.c softcore/softcore.c