112 lines
2.7 KiB
Makefile
112 lines
2.7 KiB
Makefile
CC = gcc -g
|
|
|
|
LIBS = @LIBS@ -lX11 -lscsh
|
|
SCSH_LIB = @scsh_libraries@
|
|
LIB_DIRS = -L@x_libraries@ -L$(SCSH_LIB)
|
|
INCLUDES = -I@x_includes@
|
|
|
|
SCSH_INCLUDES = @scsh_includes@
|
|
ifneq ($(SCSH_INCLUDES),)
|
|
INCLUDES += -I$(SCSH_INCLUDES)
|
|
endif
|
|
|
|
SCSH_MODULES = @scsh_modules@
|
|
|
|
SCX_VERSION = "0.1"
|
|
SCX_VM = scxvm
|
|
SCX_IMAGE = scx.image
|
|
SCX = scx
|
|
|
|
prefix = @prefix@
|
|
exec_prefix = @exec_prefix@
|
|
|
|
_LIBS = -lscsh -lm -lX11 -lcrypt -lXpm $(LIB_DL)
|
|
|
|
### The first=default target
|
|
enough: $(SCX)
|
|
|
|
### Making the VM
|
|
### The VM is scsh plus all new primitives from the c files
|
|
|
|
OBJECTS = \
|
|
c/xlib/types.o c/xlib/display.o c/xlib/window.o c/xlib/event-types.o \
|
|
c/xlib/colormap.o c/xlib/gcontext.o c/xlib/event.o \
|
|
c/xlib/graphics.o c/xlib/font.o c/xlib/visual.o \
|
|
c/xlib/cursor.o c/xlib/text.o c/xlib/property.o c/xlib/wm.o \
|
|
c/xlib/key.o c/xlib/error.o \
|
|
c/xlib/grab.o \
|
|
c/xlib/pixmap.o \
|
|
c/xlib/init.o \
|
|
c/xlib/client.o \
|
|
c/xlib/util.o
|
|
# c/libs/xpm.o
|
|
|
|
SCM_FILES = scheme/xlib/display.scm \
|
|
scheme/xlib/colormap.scm \
|
|
scheme/xlib/cursor.scm \
|
|
scheme/xlib/error.scm \
|
|
scheme/xlib/event-types.scm scheme/xlib/event.scm \
|
|
scheme/xlib/sync-event.scm\
|
|
scheme/xlib/font.scm \
|
|
scheme/xlib/gcontext.scm \
|
|
scheme/xlib/grab.scm \
|
|
scheme/xlib/graphics.scm \
|
|
scheme/xlib/key.scm \
|
|
scheme/xlib/property.scm \
|
|
scheme/xlib/text.scm \
|
|
scheme/xlib/window.scm \
|
|
scheme/xlib/wm.scm \
|
|
scheme/xlib/pixmap.scm \
|
|
scheme/xlib/visual.scm \
|
|
scheme/xlib/client.scm \
|
|
scheme/xlib/utility.scm \
|
|
scheme/xlib/atom.scm
|
|
# scheme/libs/xpm.scm
|
|
|
|
SCM_CONFIG_FILES = scheme/xlib/xlib-interfaces.scm \
|
|
scheme/xlib/xlib-packages.scm #\
|
|
# scheme/libs/libs-interfaces.scm scheme/libs/libs-packages.scm
|
|
|
|
PACKAGES = xlib xpm
|
|
|
|
$(SCX_VM): tmpmain.o $(OBJECTS)
|
|
$(CC) -o $(SCX_VM) $(LIB_DIRS) tmpmain.o $(OBJECTS) $(LIBS)
|
|
|
|
$(OBJECTS): c/xlib/xlib.h
|
|
.c.o:
|
|
$(CC) -c $(INCLUDES) -o $@ $<
|
|
|
|
tmpmain.o: c/main.c
|
|
$(CC) -c -DSCSHIMAGE=\"$(SCSH_LIB)/scsh.image\" $(INCLUDES) -o $@ $<
|
|
|
|
main.o: c/main.c
|
|
$(CC) -c -DSCSHIMAGE=\"`pwd`/scx.image\" $(INCLUDES) -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"
|
|
|
|
SCSH_ARGS = +lp $(SCSH_MODULES)/ -ll sunterlib.scm
|
|
|
|
$(SCX_IMAGE): $(SCX_VM) $(SCM_FILES) $(SCM_CONFIG_FILES)
|
|
( \
|
|
echo ",batch on"; \
|
|
echo ",config ,load $(SCM_CONFIG_FILES)"; \
|
|
echo ",load-package xlib"; \
|
|
echo "(dump-scsh \"$(SCX_IMAGE)\")"; \
|
|
) | ./$(SCX_VM) $(SCSH_ARGS)
|
|
|
|
# echo ",load-package xpm"; \
|
|
|
|
$(SCX): $(SCX_IMAGE) main.o $(OBJECTS)
|
|
$(CC) -o $@ $(LIB_DIRS) main.o $(OBJECTS) $(LIBS)
|
|
|
|
clean:
|
|
rm -f $(SCX_VM) $(SCX) $(SCX_IMAGE) *.o c/*.o c/xlib/*.o c/libs/*.o
|
|
|
|
tags:
|
|
find . -name "*.c" -or -name "*.h" -or -name "*.scm" | etags -
|