archie/prospero/lib/psrv/archie2/Makefile.backup
2024-05-27 16:13:40 +02:00

96 lines
2.2 KiB
Makefile
Executable File

A_INC = -Iarchie_src
INCS += ${A_INC}
# libraries should be relative to this dir, not SRC
DBS_LIB = libpsarchie.a
CFLAGS += -O2 -DMMAP -DSTRFIND -DCLEANUP
CFILES = \
arch_dsdb.c \
arch_prioritize.c \
prarch_match.c \
prarch_host.c \
atopdate.c \
atoplink.c
OBJECTS = \
arch_dsdb.o \
arch_prioritize.o \
prarch_match.o \
prarch_host.o \
atopdate.o \
atoplink.o
ARC_LIB = \
oper.o \
database.o \
misc.o \
error.o \
net.o
ARC_LIBSRC = \
oper.c \
database.c \
misc.c \
error.c \
net.c
CODE = ${CFILES} Makefile
all: ${DBS_LIB}
install:
cp ${DBS_LIB} ${INSTDIR}/${SRV_LIB}
ranlib ${INSTDIR}/${DBS_LIB}
cleandb:
\rm -f db/* /usr/tmp/archie.lock
\cp /dev/null db/file-list
\cp /dev/null db/strings-list
${ARC_LIB}: Makefile
${CC} ${F_CC} ${F_CPP} $*.c
${ARC_LIBSRC}:
ln -s archie_src/$@
${DBS_LIB}: ${OBJECTS} ${ARC_LIB}
rm -f ${DBS_LIB}
ar rv ${DBS_LIB} ${OBJECTS} ${ARC_LIB}
ranlib ${DBS_LIB}
# These Dependencies cannot be automatedly generated by the SWA Prospero
# scripts, unless you're running on a machine with the ARCHIE sources on it.
# Therefore, we treat them specially.
# These dependencies should be updated the next time someone reading this is
# in a position to do so.
# Actually, to set the dependencies, create a dummy archie_src directory
# with archie_defs.h, database.h, structs.h, defines.h, error.h
# This will work unless any archie include files in turn include other
# include files, which we of course don't know.
atoplink.o: prarch.h
atoplink.o: archie_src/database.h
atoplink.o: archie_src/defines.h
atoplink.o: ../../../include/pfs.h
atoplink.o: ../../../include/psite.h
atoplink.o: archie_src/structs.h
prarch_host.o: prarch.h
prarch_host.o: archie_src/archie_defs.h
prarch_host.o: archie_src/database.h
prarch_host.o: archie_src/defines.h
prarch_host.o: ../../../include/perrno.h
prarch_host.o: ../../../include/pfs.h
prarch_host.o: archie_src/structs.h
# Dependencies
arch_prioritize.o : \
../../../include/ardp.h \
../../../include/pfs_threads.h ../../../include/pfs_utils.h \
../../../include/list_macros.h \
../../../include/../lib/ardp/flocks.h ../../../include/pfs.h ../../../include/pmachine.h \
../../../include/implicit_fixes.h \
../../../include/perrno.h