2003-03-10 21:49:51 -05:00
|
|
|
CC = gcc -g
|
|
|
|
|
|
|
|
LIBS = @LIBS@ -lX11 -lscsh
|
|
|
|
SCSH_LIB = @scsh_libraries@
|
2003-05-07 09:33:48 -04:00
|
|
|
LIB_DIRS = -L@x_libraries@ -L$(SCSH_LIB)
|
|
|
|
INCLUDES = -I@x_includes@
|
2003-03-10 21:49:51 -05:00
|
|
|
|
|
|
|
SCSH_INCLUDES = @scsh_includes@
|
|
|
|
ifneq ($(SCSH_INCLUDES),)
|
2003-05-07 09:33:48 -04:00
|
|
|
INCLUDES += -I$(SCSH_INCLUDES)
|
2003-03-10 21:49:51 -05:00
|
|
|
endif
|
|
|
|
|
2003-05-16 10:43:26 -04:00
|
|
|
SCSH_MODULES = @scsh_modules@
|
|
|
|
|
2003-03-10 21:49:51 -05:00
|
|
|
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 \
|
2003-03-26 09:43:03 -05:00
|
|
|
scheme/xlib/utility.scm \
|
|
|
|
scheme/xlib/atom.scm
|
2003-03-10 21:49:51 -05:00
|
|
|
# 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
|
|
|
|
|
2003-05-19 11:40:29 -04:00
|
|
|
enough: $(SCX)
|
|
|
|
|
2003-03-10 21:49:51 -05:00
|
|
|
$(SCX_VM): tmpmain.o $(OBJECTS)
|
2003-05-19 11:40:29 -04:00
|
|
|
$(CC) $(LDFLAGS) $(CFLAGS) -o $(SCX_VM) $(LIB_DIRS) tmpmain.o $(OBJECTS) $(LIBS)
|
2003-03-10 21:49:51 -05:00
|
|
|
|
|
|
|
$(OBJECTS): c/xlib/xlib.h
|
|
|
|
.c.o:
|
2003-05-19 11:40:29 -04:00
|
|
|
$(CC) $(CFLAGS) -c $(INCLUDES) -o $@ $<
|
2003-03-10 21:49:51 -05:00
|
|
|
|
|
|
|
tmpmain.o: c/main.c
|
2003-05-19 11:40:29 -04:00
|
|
|
$(CC) -c -DSCSHIMAGE=\"$(SCSH_LIB)/scsh.image\" $(INCLUDES) $(CFLAGS) -o $@ $<
|
2003-03-10 21:49:51 -05:00
|
|
|
|
|
|
|
main.o: c/main.c
|
2003-05-19 11:40:29 -04:00
|
|
|
$(CC) -c -DSCSHIMAGE=\"`pwd`/scx.image\" $(INCLUDES) $(CFLAGS) -o $@ $<
|
2003-03-10 21:49:51 -05:00
|
|
|
|
|
|
|
|
|
|
|
### 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"
|
|
|
|
|
2003-05-16 10:43:26 -04:00
|
|
|
SCSH_ARGS = +lp $(SCSH_MODULES)/ -ll sunterlib.scm
|
|
|
|
|
2003-03-10 21:49:51 -05:00
|
|
|
$(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)\")"; \
|
2003-05-16 10:43:26 -04:00
|
|
|
) | ./$(SCX_VM) $(SCSH_ARGS)
|
2003-03-10 21:49:51 -05:00
|
|
|
|
|
|
|
# echo ",load-package xpm"; \
|
|
|
|
|
|
|
|
$(SCX): $(SCX_IMAGE) main.o $(OBJECTS)
|
2003-05-19 11:40:29 -04:00
|
|
|
$(CC) $(LDFLAGS) -o $@ $(LIB_DIRS) main.o $(OBJECTS) $(LIBS)
|
2003-03-10 21:49:51 -05:00
|
|
|
|
2003-05-16 14:54:00 -04:00
|
|
|
# --------------------
|
|
|
|
# Distribution...
|
|
|
|
|
|
|
|
distdir = /tmp
|
|
|
|
|
|
|
|
# DISTFILES should include all sources.
|
2003-05-19 11:40:29 -04:00
|
|
|
DISTFILES = COPYRIGHT INSTALL configure configure.in Makefile.in \
|
2003-05-16 14:54:00 -04:00
|
|
|
$(SCM_FILES) $(SCM_CONFIG_FILES) $(OBJECTS:.o=.c) \
|
|
|
|
c/main.c c/xlib/xlib.h
|
|
|
|
|
|
|
|
distname = scx-0.1
|
|
|
|
|
|
|
|
.PHONY : dist
|
|
|
|
dist:
|
|
|
|
distname=$(distname) && \
|
|
|
|
distfile=$(distdir)/$$distname.tar.gz && \
|
|
|
|
if [ -d $(distdir) ] && \
|
|
|
|
[ -w $$distfile -o -w $(distdir) ]; then \
|
|
|
|
rm -f $$distname && \
|
|
|
|
ln -s . $$distname && \
|
|
|
|
files='' && \
|
|
|
|
for i in $(DISTFILES); do \
|
|
|
|
files="$$files $$distname/$$i"; \
|
|
|
|
done && \
|
|
|
|
tar -cf - $$files | \
|
|
|
|
gzip --best >$$distfile && \
|
|
|
|
rm $$distname; \
|
|
|
|
else \
|
|
|
|
echo "Can't write $$distfile" >&2; \
|
|
|
|
exit 1; \
|
|
|
|
fi
|
|
|
|
|
2003-03-10 21:49:51 -05:00
|
|
|
clean:
|
|
|
|
rm -f $(SCX_VM) $(SCX) $(SCX_IMAGE) *.o c/*.o c/xlib/*.o c/libs/*.o
|
|
|
|
|
2003-09-01 07:37:56 -04:00
|
|
|
distclean: clean
|
|
|
|
rm -f configure Makefile config.log config.status
|
|
|
|
rm -rf autom4te.cache/
|
|
|
|
|
2003-03-10 21:49:51 -05:00
|
|
|
tags:
|
|
|
|
find . -name "*.c" -or -name "*.h" -or -name "*.scm" | etags -
|