1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
#
# Makefile for Server
#
# $Id: Makefile,v 1.25 2004/10/29 23:53:16 graziano Exp $
#
# include common variables
include ../Makedefs
# headers we depend upon
HDRS = ../Include/nws_nameserver.h \
../Include/nws_memory.h \
../Include/nws_state.h \
../Include/nws_db.h \
../Include/config_nws.h
# objects we create here
OBJS = $(buildobjdir)/nws_state.o \
$(buildobjdir)/nws_cache.o \
$(buildobjdir)/nws_db.o
# library we depend upon
DEP_LIB = $(buildlibdir)/$(LIBNWSNAME)
# the programs we are building and aliases
PROGRAMS = $(buildbindir)/nws_nameserver \
$(buildbindir)/nws_memory \
$(buildbindir)/nws_proxy
# what to do with nws_timeout ?
.PHONY : all clean dist install
all: $(PROGRAMS)
clean:
@$(RM) -f $(OBJS)
dist:
@$(INSTALL) -d $(DIST_ROOT)/Server
@$(CP) Makefile *.1 *.c $(DIST_ROOT)/Server
install:
@echo "Installing servers ..."
@$(CP) $(PROGRAMS) $(bindir)
@echo "Installing servers man pages ..."
@$(CP) *.1 $(mandir)/man1
# Compilation rules for C.
$(buildobjdir)/%.o : %.c $(HDRS)
$(CC) $(INCLUDES) $(CFLAGS) -c $< -o $@
# linking rules
$(buildbindir)/% : $(buildobjdir)/%.o $(OBJS) $(DEP_LIB) $(HDRS)
$(CC) $(INCLUDES) $(CFLAGS) -o $@ $< $(OBJS) $(LDFLAGS) $(DEP_LIB)
|