Build scx.image and scx.

This commit is contained in:
mainzelm 2001-12-04 11:07:15 +00:00
parent 6a225d755a
commit d77ab388d1
1 changed files with 22 additions and 11 deletions

View File

@ -1,6 +1,6 @@
### update this to fit your system
SCSH_SRC = /afs/wsi/home/dfreese/scsh-0.6
SCSH_LIB = /afs/wsi/home/dfreese/i386_fbsd40/lib/scsh
SCSH_SRC = /afs/wsi/home/gasbichl/sw/scsh-0.6
SCSH_LIB = /afs/wsi/home/gasbichl/i386_fbsd40/scsh-0.6/lib/scsh
X11_PATH = /usr/X11R6
### the following does not have to be changed (hopefully)
@ -11,8 +11,9 @@ X11_LIB = $(X11_PATH)/lib
CC = gcc
SCX_VERSION = "0.1"
SCX_VM = "scxvm"
SCX_IMAGE = "scx.image"
SCX_VM = scxvm
SCX_IMAGE = scx.image
SCX = scx
### The first=default target
enough: $(SCX_VM) #$(SCX_IMAGE) #doesn't work yet
@ -20,7 +21,7 @@ enough: $(SCX_VM) #$(SCX_IMAGE) #doesn't work yet
### Making the VM ###
### The VM is scsh plus all new primitives from the c files ###
OBJECTS = c/main.o \
OBJECTS = \
c/xlib/display.o c/xlib/window.o c/xlib/type.o c/xlib/color.o \
c/xlib/colormap.o c/xlib/pixel.o c/xlib/gcontext.o c/xlib/event.o \
c/xlib/pixmap.o c/xlib/graphics.o c/xlib/font.o \
@ -29,35 +30,45 @@ OBJECTS = c/main.o \
c/xlib/extension.o c/xlib/init.o c/xlib/util.o c/xlib/grab.o \
c/xlib/visual.o c/xlib/region.o
$(SCX_VM): c/main.o $(OBJECTS)
$(SCX_VM): tmpmain.o $(OBJECTS)
$(CC) -g -o $(SCX_VM) -L $(SCSH_LIB) -L $(X11_LIB) \
$(OBJECTS) -lscsh -lm -lX11 -lcrypt &&
tmpmain.o $(OBJECTS) -lscsh -lm -lX11 -lcrypt &&
$(OBJECTS): c/xlib/xlib.h
.c.o:
$(CC) -g -c -I $(X11_INCLUDE) -I $(SCHEME_INCLUDE) -o $@ $<
tmpmain.o: c/main.c
$(CC) -g -c -DSCSHIMAGE=\"$(SCSH_LIB)/scsh.image\" -I $(X11_INCLUDE) -I $(SCHEME_INCLUDE) -o $@ $<
main.o: c/main.c
$(CC) -g -c -DSCSHIMAGE=\"`pwd`/scx.image\" -I $(X11_INCLUDE) -I $(SCHEME_INCLUDE) -o $@ $<
### Making the Image ###
### The Image is a dump of the VM with all new packages loaded, and
### xlib opened.
STARTUP_MSG = "with SCX $(SCX_VERSION), the X11 support.";
STARTUP_MSG = "with SCX $(SCX_VERSION), the X11 support."
$(SCX_IMAGE):
$(SCX_IMAGE): $(SCX_VM)
( \
echo ",batch on"; \
echo ",config ,load scheme/xlib/xlib-type-interfaces.scm"; \
echo ",config ,load scheme/xlib/xlib-type-package.scm"; \
echo ",config ,load scheme/xlib/xlib-interfaces.scm"; \
echo ",config ,load scheme/xlib/xlib-packages.scm"; \
echo ",open xlib"; \
echo ",load-package xlib"; \
echo ",load-package xlib-types"; \
echo ",dump $(SCX_IMAGE) \"$(STARTUP_MSG)\"" \
) | $(SCX_VM)
$(SCX): $(SCX_IMAGE) main.o $(OBJECTS)
$(CC) -g -o $@ -L $(SCSH_LIB) -L $(X11_LIB) \
main.o $(OBJECTS) -lscsh -lm -lX11 -lcrypt &&
#SCSH_IMAGE = "/afs/wsi/home/dfreese/i386_fbsd43/lib/scheme48/scsh.image"
#main.c:
clean:
rm -f $(SCX_VM) c/*.o c/xlib/*.o
rm -f $(SCX_VM) $(SCX) $(SCX_IMAGE) *.o c/*.o c/xlib/*.o