60 lines
1.4 KiB
Makefile
60 lines
1.4 KiB
Makefile
|
CC = @CC@
|
||
|
LIBS = @LIBS@ -lscsh -lsasl2
|
||
|
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@
|
||
|
LDAP_VM = scshldapvm
|
||
|
LDAP_IMAGE = scsh-ldap.image
|
||
|
LDAP = scsh-ldap
|
||
|
|
||
|
prefix = @prefix@
|
||
|
exec_prefix = @exec_prefix@
|
||
|
|
||
|
enough: $(LDAP)
|
||
|
|
||
|
DIST_SOURCES = c/ldap.c
|
||
|
|
||
|
OBJECTS = $(DIST_SOURCES:.c=.o)
|
||
|
|
||
|
SCM_FILES = scheme/ldap.scm
|
||
|
|
||
|
SCM_CONFIG_FILES = scheme/ldap-interfaces.scm scheme/ldap-packages.scm
|
||
|
|
||
|
$(LDAP_VM): tmpmain.o $(OBJECTS)
|
||
|
$(CC) $(LDFLAGS) $(CFLAGS) -o $(LDAP_VM) $(LIB_DIRS) tmpmain.o $(OBJECTS) $(LIBS)
|
||
|
|
||
|
$(OBJECTS): c/scsh-ldap.h
|
||
|
.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-ldap.image\" $(INCLUDES) $(CFLAGS) -o $@ $<
|
||
|
|
||
|
$(LDAP_IMAGE): $(LDAP_VM) $(SCM_FILES) $(SCM_CONFIG_FILES)
|
||
|
( \
|
||
|
echo ",batch on"; \
|
||
|
echo ",config ,load $(SCM_CONFIG_FILES)"; \
|
||
|
echo ",load-package ldap-low"; \
|
||
|
echo "(dump-scsh \"$(LDAP_IMAGE)\")"; \
|
||
|
) | ./$(LDAP_VM) $(SCSH_ARGS)
|
||
|
|
||
|
$(LDAP): $(LDAP_IMAGE) main.o $(OBJECTS)
|
||
|
$(CC) $(LDFLAGS) -o $@ $(LIB_DIRS) main.o $(OBJECTS) $(LIBS)
|
||
|
|
||
|
clean:
|
||
|
rm -f $(LDAP_VM) $(LDAP) $(LDAP_IMAGE) *.o c/*.o
|
||
|
|
||
|
distclean: clean
|
||
|
rm -f configure Makefile config.log config.status
|
||
|
rm -rf autom4te.cache/
|