cig-script standalone and scsh-obj

This commit is contained in:
marting 1999-09-16 00:24:14 +00:00
parent 0ffe78e179
commit 0c6d2e5bd5
1 changed files with 26 additions and 20 deletions

View File

@ -41,7 +41,7 @@ mandir = $(prefix)/man/man$(manext)
# LDFLAGS = -N
.c.o:
$(CC) -c $(CPPFLAGS) $(DEFS) -I$(srcdir)/c $(CFLAGS) -o $@ $<
$(CC) -c $(CPPFLAGS) $(DEFS) -I$(srcdir)/c -I$(srcdir)/cig $(CFLAGS) -o $@ $<
# You might want to change RUNNABLE to "s48"
RUNNABLE = s4853
@ -110,6 +110,10 @@ LIBSCSH = scsh/lib$(VM).a
SCSHVMHACKS = proc2.o
#JMG: and it's object files
#JMG left out: scsh/re.o scsh/re1.o scsh/regexp/regexp.o scsh/regexp/regsub.o
# scsh/fdports1.o
# scsh/rdelim.o
SCSHOBJS = \
scsh/dirstuff1.o \
scsh/flock.o scsh/flock1.o \
@ -119,25 +123,19 @@ SCSHOBJS = \
scsh/machine/libansi.o \
scsh/network.o scsh/network1.o \
scsh/putenv.o \
scsh/re.o scsh/re1.o \
scsh/regexp/regexp.o \
scsh/regexp/regsub.o \
scsh/select.o scsh/select1.o \
scsh/sleep1.o \
scsh/syscalls.o scsh/syscalls1.o \
scsh/time.o scsh/time1.o \
scsh/tty.o scsh/tty1.o \
scsh/userinfo1.o \
scsh/rdelim.o \
scsh/fdports1.o \
scsh/sighandlers1.o scsh/sighandlers.o
UNIX_OBJS = c/unix/misc.o c/unix/io.o c/unix/fd-io.o c/unix/event.o
#JMG: I omit process_args.o and SCSHVMHACKS at the moment
OBJS = c/scheme48vm.o c/scheme48heap.o c/extension.o c/external.o \
$(CIGOBJS)
#$(SCSHOBJS)
$(CIGOBJS) $(SCSHOBJS)
FAKEHS = c/fake/dlfcn.h c/fake/sigact.h c/fake/strerror.h \
c/fake/sys-select.h
@ -197,7 +195,8 @@ JMG: scsh stuff
# This says how to process .scm files with cig to make .c stubs.
.SUFFIXES: .scm
.scm.c:
$(srcdir)/$(VM) -o $(srcdir)/$(VM) -i $(CIG) < $< > $*.c
$(srcdir)/cig/cigscript $*
# $(srcdir)/$(VM) -o $(srcdir)/$(VM) -i $(CIG) < $< > $*.c
# These .h files mediate between the code exported from foo1.c
# and imported into foo.scm's stub foo.c.
@ -240,9 +239,9 @@ $(LIBCIG): c/main.o $(OBJS)
$(AR) $@ c/main.o $(OBJS)
$(RANLIB) $@
$(LIBSCSH): smain.o $(OBJS)
$(LIBSCSH): c/smain.o $(OBJS)
$(RM) $@
$(AR) $@ smain.o $(OBJS)
$(AR) $@ c/smain.o $(OBJS)
$(RANLIB) $@
c/main.o: c/main.c c/scheme48vm.h c/scheme48heap.h
@ -361,14 +360,19 @@ clean: clean-cig clean-scsh
-rm -f $(VM) *.o c/unix/*.o c/*.o c/fake/*.o \
TAGS $(IMAGE) \
build/*.tmp $(MANPAGE) build/linker.image \
scheme/debug/*.image scheme/debug/*.debug config.cache \
scheme/debug/*.image scheme/debug/*.debug \
scheme/vm/scheme48vm.c scheme/vm/scheme48heap.c \
go $(distname)
clean-cig:
-rm -f cig/*.o $(CIG) $(CIG).image $(LIBCIG)
clean-scm2c:
rm -f scsh/flock.c scsh/jcontrol2.c scsh/network.c scsh/rdelim.c \
scsh/re.c scsh/select.c scsh/syscalls.c scsh/tty.c scsh/time.c
#JMG: moved config.cache to distclean
distclean: clean
rm -f Makefile config.log config.status c/sysdep.h
rm -f Makefile config.log config.status c/sysdep.h config.cache
check: $(VM) $(IMAGE) scheme/debug/check.scm
( \
@ -566,7 +570,7 @@ scheme/debug/medium.image: $(LINKER_IMAGE) $(CONFIG_FILES)
c/smain.o: c/main.c
$(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) -DSTATIC_AREAS -o $@ c/main.c
mini: mini-heap.o smain.o
mini: mini-heap.o c/smain.o
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ c/smain.o mini-heap.o $(OBJS) $(LIBS)
mini-heap.o: mini-heap.c
@ -634,7 +638,7 @@ i-know-what-i-am-doing:
mv ../scheme/vm/scheme48vm.c ../scheme/vm/scheme48heap.c ../c
cig: $(CIG) $(CIG).image $(LIBCIG)
$(CIG): $(VM) $(IMAGE) $(srcdir)/cig/cig.scm $(srcdir)/cig/libcig.scm
$(CIG): $(VM) $(IMAGE) $(srcdir)/cig/cig.scm $(srcdir)/cig/libcig.scm
(echo ",batch"; \
echo ",translate =scheme48/ $(srcdir)/scheme/"; \
echo ",config ,load $(srcdir)/cig/cig.scm"; \
@ -646,6 +650,7 @@ $(CIG): $(VM) $(IMAGE) $(srcdir)/cig/cig.scm $(srcdir)/cig/libcig.scm
| ./$(VM) -i ./$(IMAGE)
$(srcdir)/cig/image2script $(LIB)/$(VM) </tmp/cig > $(CIG)
-chmod +x $(CIG)
mv /tmp/cig $(srcdir)/cig/standalone.image
$(RM) /tmp/cig
$(CIG)2:
@ -756,13 +761,14 @@ scsh/scsh: scsh/scsh-tramp.c
-DIMAGE=\"$(LIB)/scsh.image\" \
scsh/scsh-tramp.c
#JMG : should be ,open external-calls
#JMG : not anymore appropriate
#echo ",open external-calls"; \
# echo "(lookup-all-externals)"; \
scsh/scsh.image: $(VM) $(SCHEME) $(CIG).image
(echo ",translate =scheme48/ $(srcdir)/scheme/"; \
echo ",batch on"; \
echo ",load-package floatnums"; \
echo ",open externals"; \
echo "(lookup-all-externals)"; \
echo ",config"; \
echo ",load $(srcdir)/scsh/let-opt.scm"; \
echo ",load $(srcdir)/scsh/scsh-interfaces.scm"; \
@ -778,7 +784,7 @@ scsh/scsh.image: $(VM) $(SCHEME) $(CIG).image
echo ",open floatnums"; \
echo ",open scsh"; \
echo "(dump-scsh \"scsh/scsh.image\")") \
| ./$(VM) -o ./$(VM) -i $(CIG).image
| ./$(VM) -o ./$(VM) -i $(CIG).image -h 5000000
#scsh/scsh.image: $(VM) $(SCHEME) $(CIG).image
# (echo ",translate =scheme48/ $(srcdir)/"; \
@ -838,4 +844,4 @@ install-scsh: scsh
clean-scsh:
$(RM) scsh/*.o scsh/regexp/*.o scsh/machine/*.o scsh/*.image scsh/scsh
$(RM) $(LIBSCSH) scsh/scsh.vm
-cd scsh/regexp; $(MAKE) clean
# -cd scsh/regexp; $(MAKE) clean JMG: no extra regep