- updated for new libs directory and structures, resp. the xpm package.
This commit is contained in:
parent
72bfd523d1
commit
40fcb8e61d
27
Makefile
27
Makefile
|
@ -2,6 +2,7 @@
|
||||||
SCSH_SRC = /home/david/dev/scsh-0.6
|
SCSH_SRC = /home/david/dev/scsh-0.6
|
||||||
SCSH_LIB = /usr/local/lib/scsh
|
SCSH_LIB = /usr/local/lib/scsh
|
||||||
X11_PATH = /usr/X11R6
|
X11_PATH = /usr/X11R6
|
||||||
|
LIB_DL = -ldl
|
||||||
|
|
||||||
### the following does not have to be changed (hopefully)
|
### the following does not have to be changed (hopefully)
|
||||||
SCHEME_INCLUDE = $(SCSH_SRC)/c
|
SCHEME_INCLUDE = $(SCSH_SRC)/c
|
||||||
|
@ -15,11 +16,13 @@ SCX_VM = scxvm
|
||||||
SCX_IMAGE = scx.image
|
SCX_IMAGE = scx.image
|
||||||
SCX = scx
|
SCX = scx
|
||||||
|
|
||||||
|
LIBS = -lscsh -lm -lX11 -lcrypt -lXpm $(LIB_DL)
|
||||||
|
|
||||||
### The first=default target
|
### The first=default target
|
||||||
enough: $(SCX)
|
enough: $(SCX)
|
||||||
|
|
||||||
### Making the VM ###
|
### Making the VM
|
||||||
### The VM is scsh plus all new primitives from the c files ###
|
### The VM is scsh plus all new primitives from the c files
|
||||||
|
|
||||||
OBJECTS = \
|
OBJECTS = \
|
||||||
c/xlib/display.o c/xlib/window.o c/xlib/type.o c/xlib/color.o \
|
c/xlib/display.o c/xlib/window.o c/xlib/type.o c/xlib/color.o \
|
||||||
|
@ -28,7 +31,8 @@ OBJECTS = \
|
||||||
c/xlib/cursor.o c/xlib/text.o c/xlib/property.o c/xlib/wm.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/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/extension.o c/xlib/init.o c/xlib/util.o c/xlib/grab.o \
|
||||||
c/xlib/visual.o c/xlib/region.o
|
c/xlib/visual.o c/xlib/region.o \
|
||||||
|
c/libs/xpm.o
|
||||||
|
|
||||||
SCM_FILES = scheme/xlib/atom-type.scm scheme/xlib/client.scm \
|
SCM_FILES = scheme/xlib/atom-type.scm scheme/xlib/client.scm \
|
||||||
scheme/xlib/color-type.scm scheme/xlib/color.scm \
|
scheme/xlib/color-type.scm scheme/xlib/color.scm \
|
||||||
|
@ -48,16 +52,20 @@ SCM_FILES = scheme/xlib/atom-type.scm scheme/xlib/client.scm \
|
||||||
scheme/xlib/text.scm scheme/xlib/utility.scm \
|
scheme/xlib/text.scm scheme/xlib/utility.scm \
|
||||||
scheme/xlib/visual-type.scm scheme/xlib/visual.scm \
|
scheme/xlib/visual-type.scm scheme/xlib/visual.scm \
|
||||||
scheme/xlib/window-type.scm scheme/xlib/window.scm \
|
scheme/xlib/window-type.scm scheme/xlib/window.scm \
|
||||||
scheme/xlib/wm.scm
|
scheme/xlib/wm.scm \
|
||||||
|
scheme/libs/xpm.scm
|
||||||
|
|
||||||
SCM_CONFIG_FILES = scheme/xlib/xlib-type-interfaces.scm \
|
SCM_CONFIG_FILES = scheme/xlib/xlib-type-interfaces.scm \
|
||||||
scheme/xlib/xlib-type-package.scm \
|
scheme/xlib/xlib-type-package.scm \
|
||||||
scheme/xlib/xlib-interfaces.scm \
|
scheme/xlib/xlib-interfaces.scm \
|
||||||
scheme/xlib/xlib-packages.scm
|
scheme/xlib/xlib-packages.scm \
|
||||||
|
scheme/libs/libs-interfaces.scm scheme/libs/libs-packages.scm
|
||||||
|
|
||||||
|
PACKAGES = xlib xlib-types xpm
|
||||||
|
|
||||||
$(SCX_VM): tmpmain.o $(OBJECTS)
|
$(SCX_VM): tmpmain.o $(OBJECTS)
|
||||||
$(CC) -g -o $(SCX_VM) -L $(SCSH_LIB) -L $(X11_LIB) \
|
$(CC) -g -o $(SCX_VM) -L $(SCSH_LIB) -L $(X11_LIB) \
|
||||||
tmpmain.o $(OBJECTS) -lscsh -lm -lX11 -lcrypt -ldl
|
tmpmain.o $(OBJECTS) $(LIBS)
|
||||||
|
|
||||||
$(OBJECTS): c/xlib/xlib.h
|
$(OBJECTS): c/xlib/xlib.h
|
||||||
.c.o:
|
.c.o:
|
||||||
|
@ -70,7 +78,7 @@ main.o: c/main.c
|
||||||
$(CC) -g -c -DSCSHIMAGE=\"`pwd`/scx.image\" -I $(X11_INCLUDE) -I $(SCHEME_INCLUDE) -o $@ $<
|
$(CC) -g -c -DSCSHIMAGE=\"`pwd`/scx.image\" -I $(X11_INCLUDE) -I $(SCHEME_INCLUDE) -o $@ $<
|
||||||
|
|
||||||
|
|
||||||
### Making the Image ###
|
### Making the Image
|
||||||
### The Image is a dump of the VM with all new packages loaded, and
|
### The Image is a dump of the VM with all new packages loaded, and
|
||||||
### xlib opened.
|
### xlib opened.
|
||||||
|
|
||||||
|
@ -82,12 +90,13 @@ $(SCX_IMAGE): $(SCX_VM) $(SCM_FILES) $(SCM_CONFIG_FILES)
|
||||||
echo ",config ,load $(SCM_CONFIG_FILES)"; \
|
echo ",config ,load $(SCM_CONFIG_FILES)"; \
|
||||||
echo ",load-package xlib"; \
|
echo ",load-package xlib"; \
|
||||||
echo ",load-package xlib-types"; \
|
echo ",load-package xlib-types"; \
|
||||||
|
echo ",load-package xpm"; \
|
||||||
echo ",dump $(SCX_IMAGE) \"$(STARTUP_MSG)\"" \
|
echo ",dump $(SCX_IMAGE) \"$(STARTUP_MSG)\"" \
|
||||||
) | ./$(SCX_VM)
|
) | ./$(SCX_VM)
|
||||||
|
|
||||||
$(SCX): $(SCX_IMAGE) main.o $(OBJECTS)
|
$(SCX): $(SCX_IMAGE) main.o $(OBJECTS)
|
||||||
$(CC) -g -o $@ -L $(SCSH_LIB) -L $(X11_LIB) \
|
$(CC) -g -o $@ -L $(SCSH_LIB) -L $(X11_LIB) \
|
||||||
main.o $(OBJECTS) -lscsh -lm -lX11 -lcrypt -ldl
|
main.o $(OBJECTS) $(LIBS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(SCX_VM) $(SCX) $(SCX_IMAGE) *.o c/*.o c/xlib/*.o
|
rm -f $(SCX_VM) $(SCX) $(SCX_IMAGE) *.o c/*.o c/xlib/*.o c/libs/*.o
|
||||||
|
|
34
c/main.c
34
c/main.c
|
@ -1,5 +1,7 @@
|
||||||
#include "scheme48.h"
|
#include "scheme48.h"
|
||||||
|
|
||||||
|
/* Xlib */
|
||||||
|
|
||||||
extern void scx_init_window();
|
extern void scx_init_window();
|
||||||
extern void scx_init_display();
|
extern void scx_init_display();
|
||||||
extern void scx_init_type();
|
extern void scx_init_type();
|
||||||
|
@ -25,8 +27,13 @@ extern void scx_init_grab();
|
||||||
extern void scx_init_visual();
|
extern void scx_init_visual();
|
||||||
extern void scx_init_region();
|
extern void scx_init_region();
|
||||||
|
|
||||||
|
/* Xpm */
|
||||||
|
|
||||||
|
extern void scx_init_xpm();
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
// char** my_argv = argv;
|
|
||||||
|
/* Xlib */
|
||||||
|
|
||||||
s48_add_external_init(scx_init_window);
|
s48_add_external_init(scx_init_window);
|
||||||
s48_add_external_init(scx_init_display);
|
s48_add_external_init(scx_init_display);
|
||||||
|
@ -54,31 +61,10 @@ int main(int argc, char **argv) {
|
||||||
s48_add_external_init(scx_init_visual);
|
s48_add_external_init(scx_init_visual);
|
||||||
s48_add_external_init(scx_init_region);
|
s48_add_external_init(scx_init_region);
|
||||||
|
|
||||||
/* char **argp; //JMG
|
/* Xpm */
|
||||||
char *image_name = DEFAULT_IMAGE_NAME;
|
|
||||||
long heap_size = DEFAULT_HEAP_SIZE; // in numbers of cells
|
|
||||||
long stack_size = DEFAULT_STACK_SIZE; // in numbers of cells
|
|
||||||
char *object_file = NULL; // specified via a command line argument
|
|
||||||
char *prog_name;
|
|
||||||
|
|
||||||
#if defined(STATIC_AREAS)
|
s48_add_external_init(scx_init_xpm);
|
||||||
extern long static_entry;
|
|
||||||
extern long static_symbol_table;
|
|
||||||
extern long static_imported_binding_table, static_exported_binding_table;
|
|
||||||
extern long p_count, *p_areas[], p_sizes[];
|
|
||||||
extern long i_count, *i_areas[], i_sizes[];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
long vm_argc = 0;
|
|
||||||
char *me = *argv; // Save program name.
|
|
||||||
prog_name = *argv++;
|
|
||||||
|
|
||||||
argv=process_args(argv,
|
|
||||||
&heap_size, &stack_size,
|
|
||||||
&object_file, &image_name);
|
|
||||||
for(argc=0, argp=argv; *argp; argc++, argp++); // Recompute argc.
|
|
||||||
return internal_s48_main(heap_size, stack_size, prog_name, object_file, image_name, argc, argv);
|
|
||||||
*/
|
|
||||||
|
|
||||||
s48_main(8000000, 64000,
|
s48_main(8000000, 64000,
|
||||||
SCSHIMAGE,
|
SCSHIMAGE,
|
||||||
|
|
Loading…
Reference in New Issue