scx/Makefile

103 lines
3.3 KiB
Makefile
Raw Normal View History

2001-12-04 05:23:51 -05:00
### update this to fit your system
SCSH_PREFIX = /usr/local
2001-12-04 05:23:51 -05:00
X11_PATH = /usr/X11R6
LIB_DL = -ldl
2001-12-04 05:23:51 -05:00
### the following does not have to be changed (hopefully)
SCHEME_INCLUDE = $(SCSH_PREFIX)/include
SCSH_LIB = $(SCSH_PREFIX)/lib/scsh
2001-12-04 05:23:51 -05:00
X11_INCLUDE = $(X11_PATH)/include
X11_LIB = $(X11_PATH)/lib
CC = gcc
SCX_VERSION = "0.1"
2001-12-04 06:07:15 -05:00
SCX_VM = scxvm
SCX_IMAGE = scx.image
SCX = scx
2001-12-04 05:23:51 -05:00
LIBS = -lscsh -lm -lX11 -lcrypt -lXpm $(LIB_DL)
2001-12-04 05:23:51 -05:00
### The first=default target
enough: $(SCX)
2001-12-04 05:23:51 -05:00
### Making the VM
### The VM is scsh plus all new primitives from the c files
2001-12-04 05:23:51 -05:00
2001-12-04 06:07:15 -05:00
OBJECTS = \
2001-12-04 05:23:51 -05:00
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 \
c/xlib/cursor.o c/xlib/text.o c/xlib/property.o c/xlib/wm.o \
c/xlib/client.o c/xlib/key.o c/xlib/error.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 \
c/libs/xpm.o
2001-12-04 05:23:51 -05:00
SCM_FILES = scheme/xlib/atom-type.scm scheme/xlib/client.scm \
scheme/xlib/color-type.scm scheme/xlib/color.scm \
scheme/xlib/colormap-type.scm scheme/xlib/colormap.scm \
scheme/xlib/cursor-type.scm scheme/xlib/cursor.scm \
scheme/xlib/display-type.scm \
scheme/xlib/display.scm scheme/xlib/drawable-type.scm \
scheme/xlib/drawable.scm scheme/xlib/error.scm \
scheme/xlib/event-type.scm scheme/xlib/event.scm \
scheme/xlib/extension.scm scheme/xlib/font-type.scm \
scheme/xlib/font.scm scheme/xlib/gcontext-type.scm \
scheme/xlib/gcontext.scm scheme/xlib/grab.scm scheme/xlib/graphics.scm \
scheme/xlib/helper.scm scheme/xlib/key.scm scheme/xlib/pixel-type.scm \
scheme/xlib/pixel.scm scheme/xlib/pixmap-type.scm \
scheme/xlib/pixmap.scm scheme/xlib/property.scm \
scheme/xlib/region-type.scm scheme/xlib/region.scm \
scheme/xlib/text.scm scheme/xlib/utility.scm \
scheme/xlib/visual-type.scm scheme/xlib/visual.scm \
scheme/xlib/window-type.scm scheme/xlib/window.scm \
scheme/xlib/wm.scm \
scheme/libs/xpm.scm
SCM_CONFIG_FILES = scheme/xlib/xlib-type-interfaces.scm \
scheme/xlib/xlib-type-package.scm \
scheme/xlib/xlib-interfaces.scm \
scheme/xlib/xlib-packages.scm \
scheme/libs/libs-interfaces.scm scheme/libs/libs-packages.scm
PACKAGES = xlib xlib-types xpm
2001-12-04 06:07:15 -05:00
$(SCX_VM): tmpmain.o $(OBJECTS)
2001-12-04 05:23:51 -05:00
$(CC) -g -o $(SCX_VM) -L $(SCSH_LIB) -L $(X11_LIB) \
tmpmain.o $(OBJECTS) $(LIBS)
2001-12-04 05:23:51 -05:00
$(OBJECTS): c/xlib/xlib.h
.c.o:
$(CC) -g -c -I $(X11_INCLUDE) -I $(SCHEME_INCLUDE) -o $@ $<
2001-12-04 06:07:15 -05:00
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 $@ $<
2001-12-04 05:23:51 -05:00
### Making the Image
2001-12-04 05:23:51 -05:00
### 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"
2001-12-04 05:23:51 -05:00
$(SCX_IMAGE): $(SCX_VM) $(SCM_FILES) $(SCM_CONFIG_FILES)
2001-12-04 05:23:51 -05:00
( \
echo ",batch on"; \
echo ",config ,load $(SCM_CONFIG_FILES)"; \
2001-12-04 06:07:15 -05:00
echo ",load-package xlib"; \
echo ",load-package xlib-types"; \
echo ",load-package xpm"; \
echo "(dump-scsh \"$(SCX_IMAGE)\")"; \
) | ./$(SCX_VM)
2001-12-04 05:23:51 -05:00
2001-12-04 06:07:15 -05:00
$(SCX): $(SCX_IMAGE) main.o $(OBJECTS)
$(CC) -g -o $@ -L $(SCSH_LIB) -L $(X11_LIB) \
main.o $(OBJECTS) $(LIBS)
2001-12-04 05:23:51 -05:00
clean:
rm -f $(SCX_VM) $(SCX) $(SCX_IMAGE) *.o c/*.o c/xlib/*.o c/libs/*.o