138 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
		
			Executable File
		
	
	
			
		
		
	
	
			138 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
		
			Executable File
		
	
	
. ../../config/system
 | 
						|
. ../../config/site
 | 
						|
 | 
						|
if [ _$gdbm = _yes ]; then
 | 
						|
    gdbm_c="gdbm.c"
 | 
						|
    gdbm_o="gdbm.o"
 | 
						|
    gdbm_so="gdbm.so"
 | 
						|
else
 | 
						|
    gdbm_incl=
 | 
						|
fi
 | 
						|
 | 
						|
echo Building Makefile.local...
 | 
						|
cat <<EOT >Makefile.local
 | 
						|
# This Makefile was produced by running ./build in this directory.
 | 
						|
 | 
						|
SHELL=/bin/sh
 | 
						|
 | 
						|
CC= ${cc-cc}
 | 
						|
CFLAGS= $cflags $obj_cflags
 | 
						|
LINTFLAGS= $lintflags
 | 
						|
 | 
						|
INC=	../../include
 | 
						|
 | 
						|
H=	\$(INC)/compat.h\\
 | 
						|
	\$(INC)/config.h\\
 | 
						|
	\$(INC)/cstring.h\\
 | 
						|
	\$(INC)/exception.h\\
 | 
						|
	\$(INC)/extern.h\\
 | 
						|
	\$(INC)/funcproto.h\\
 | 
						|
	\$(INC)/gc.h\\
 | 
						|
	\$(INC)/misc.h\\
 | 
						|
	\$(INC)/object.h\\
 | 
						|
	\$(INC)/param.h\\
 | 
						|
	\$(INC)/stkmem.h\\
 | 
						|
	\$(INC)/type.h
 | 
						|
 | 
						|
C=	bitstring.c\\
 | 
						|
	debug.c\\
 | 
						|
	elk-eval.c\\
 | 
						|
	hack.c\\
 | 
						|
	monitor.c\\
 | 
						|
	newhandler.c\\
 | 
						|
	record.c\\
 | 
						|
	regexp.c\\
 | 
						|
	struct.c $gdbm_c
 | 
						|
 | 
						|
O=	bitstring.o\\
 | 
						|
	debug.o\\
 | 
						|
	elk-eval.o\\
 | 
						|
	hack.o\\
 | 
						|
	monitor.o\\
 | 
						|
	newhandler.o\\
 | 
						|
	record.o\\
 | 
						|
	regexp.o\\
 | 
						|
	struct.o $gdbm_o
 | 
						|
 | 
						|
SO=	bitstring.so\\
 | 
						|
	debug.so\\
 | 
						|
	elk-eval.so\\
 | 
						|
	hack.so\\
 | 
						|
	monitor.so\\
 | 
						|
	newhandler.so\\
 | 
						|
	record.so\\
 | 
						|
	regexp.so\\
 | 
						|
	struct.so $gdbm_so
 | 
						|
 | 
						|
.c.o:
 | 
						|
	\$(CC) \$(CFLAGS) -I\$(INC) $gdbm_incl -c \$<
 | 
						|
	../../scripts/makedl \$@ \$@
 | 
						|
 | 
						|
all: \$(SO)
 | 
						|
 | 
						|
bitstring.o:	\$(H) bitstring.c
 | 
						|
debug.o:	\$(H) debug.c
 | 
						|
elk-eval.o:	\$(H) elk-eval.c
 | 
						|
hack.o:		\$(H) hack.c
 | 
						|
monitor.o:	\$(H) monitor.c
 | 
						|
newhandler.o:	\$(H) newhandler.c
 | 
						|
record.o:	\$(H) record.c
 | 
						|
regexp.o:	\$(H) regexp.c
 | 
						|
struct.o:	\$(H) struct.c
 | 
						|
gdbm.o:		\$(H) gdbm.c
 | 
						|
 | 
						|
bitstring.so:	bitstring.o
 | 
						|
	gcc -shared -o \$@ \$< -lc
 | 
						|
 | 
						|
debug.so:	debug.o
 | 
						|
	gcc -shared -o \$@ \$< -lc
 | 
						|
 | 
						|
elk-eval.so:	elk-eval.o
 | 
						|
	gcc -shared -o \$@ \$< -lc
 | 
						|
 | 
						|
hack.so:	hack.o
 | 
						|
	gcc -shared -o \$@ \$< -lc
 | 
						|
 | 
						|
monitor.so:	monitor.o
 | 
						|
	gcc -shared -o \$@ \$< -lc
 | 
						|
 | 
						|
newhandler.so:	newhandler.o
 | 
						|
	gcc -shared -o \$@ \$< -lc
 | 
						|
 | 
						|
record.so:	record.o
 | 
						|
	gcc -shared -o \$@ \$< -lc
 | 
						|
 | 
						|
regexp.so:	regexp.o
 | 
						|
	gcc -shared -o \$@ \$< -lc
 | 
						|
 | 
						|
struct.so:	struct.o
 | 
						|
	gcc -shared -o \$@ \$< -lc
 | 
						|
 | 
						|
gdbm.so:	gdbm.o
 | 
						|
	gcc -shared -o \$@ \$< -lgdbm -lc
 | 
						|
 | 
						|
install: \$(SO)
 | 
						|
	-@if [ ! -d $install_dir/lib ]; then \\
 | 
						|
	    echo mkdir $install_dir/lib; \\
 | 
						|
	    mkdir $install_dir/lib; \\
 | 
						|
	fi
 | 
						|
	-@if [ ! -d $install_dir/lib/elk ]; then \\
 | 
						|
	    echo mkdir $install_dir/lib/elk; \\
 | 
						|
	    mkdir $install_dir/lib/elk; \\
 | 
						|
	fi
 | 
						|
	@for i in \$(SO) ;\\
 | 
						|
	do \\
 | 
						|
	    echo cp \$\$i $install_dir/lib/elk; \\
 | 
						|
	    cp \$\$i $install_dir/lib/elk; \\
 | 
						|
	done
 | 
						|
 | 
						|
lint:
 | 
						|
	lint \$(LINTFLAGS) -I\$(INC) $gdbm_incl \$(C)
 | 
						|
 | 
						|
clean:
 | 
						|
	rm -f *.so *.o core
 | 
						|
 | 
						|
distclean:
 | 
						|
	rm -f *.so *.o core lint.out Makefile.local
 | 
						|
EOT
 |