- added autoconf and configure files
This commit is contained in:
parent
aaf82e55b6
commit
a36065a672
|
@ -0,0 +1,106 @@
|
|||
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
|
||||
|
||||
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/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"
|
||||
|
||||
$(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)
|
||||
|
||||
# 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 -
|
|
@ -0,0 +1,29 @@
|
|||
#AC_DEFUN(
|
||||
|
||||
AC_INIT
|
||||
AC_PROG_CC
|
||||
|
||||
AC_PATH_X
|
||||
AC_SUBST(x_includes)
|
||||
AC_SUBST(x_libraries)
|
||||
|
||||
AC_ARG_WITH(scsh-includes, [ --with-scsh-includes=DIR scsh include files are in DIR [/usr/local]],
|
||||
scsh_includes=$withval , scsh_includes=)
|
||||
AC_SUBST(scsh_includes)
|
||||
AC_ARG_WITH(scsh-libraries, [ --with-scsh-libraries=DIR scsh libraries are in DIR [/usr/local/lib/scsh]],
|
||||
scsh_libraries=$withval , scsh_libraries=/usr/local/lib/scsh)
|
||||
AC_SUBST(scsh_libraries)
|
||||
|
||||
#AC_MSG_CHECKING(scsh installation)
|
||||
#AC_CHECK_HEADER(scheme48.h)
|
||||
#AC_CHECK_LIB(scsh/libscsh.a, scsh_access)
|
||||
|
||||
AC_CHECK_LIB(crypt, crypt)
|
||||
AC_CHECK_LIB(dl, dlopen)
|
||||
AC_CHECK_LIB(m, exp)
|
||||
|
||||
#if no_x == 'yes' fail ...
|
||||
|
||||
AC_SUBST(LIBS)
|
||||
|
||||
AC_OUTPUT(Makefile)
|
Loading…
Reference in New Issue