scsh-yp/Makefile.in

60 lines
1.3 KiB
Makefile

CC = @CC@
LIBS = @LIBS@ -lscsh
SCSH_LIB = @scsh_libraries@
LIB_DIRS = -L$(SCSH_LIB)
INCLUDES = -I. -I./c
SCSH_INCLUDES = @scsh_includes@
ifneq ($(SCSH_INCLUDES),)
INCLUDES += -I$(SCSH_INCLUDES)
endif
SCSH_MODULES = @scsh_modules@
YP_VM = scshypvm
YP_IMAGE = scsh-yp.image
YP = scsh-yp
prefix = @prefix@
exec_prefix = @exec_prefix@
enough: $(YP)
DIST_SOURCES = c/yp.c
OBJECTS = $(DIST_SOURCES:.c=.o)
SCM_FILES = scheme/yp.scm
SCM_CONFIG_FILES = scheme/yp-interfaces.scm scheme/yp-packages.scm
$(YP_VM): tmpmain.o $(OBJECTS)
$(CC) $(LDFLAGS) $(CFLAGS) -o $(YP_VM) $(LIB_DIRS) tmpmain.o $(OBJECTS) $(LIBS)
$(OBJECTS):
.c.o:
$(CC) $(CFLAGS) -c $(INCLUDES) -o $@ $<
tmpmain.o: c/main.c
$(CC) -c -DSCSHIMAGE=\"$(SCSH_LIB)/scsh.image\" $(INCLUDES) $(CFLAGS) -o $@ $<
main.o: c/main.c
$(CC) -c -DSCSHIMAGE=\"`pwd`/scsh-yp.image\" $(INCLUDES) $(CFLAGS) -o $@ $<
$(YP_IMAGE): $(YP_VM) $(SCM_FILES) $(SCM_CONFIG_FILES)
( \
echo ",batch on"; \
echo ",config ,load $(SCM_CONFIG_FILES)"; \
echo ",load-package yp"; \
echo "(dump-scsh \"$(YP_IMAGE)\")"; \
) | ./$(YP_VM) $(SCSH_ARGS)
$(YP): $(YP_IMAGE) main.o $(OBJECTS)
$(CC) $(LDFLAGS) -o $@ $(LIB_DIRS) main.o $(OBJECTS) $(LIBS)
clean:
rm -f $(YP_VM) $(YP) $(YP_IMAGE) *.o c/*.o
distclean: clean
rm -f configure Makefile config.log config.status
rm -rf autom4te.cache/