|
|
1.1 ! root 1: ############################################################################### ! 2: # @(#)Makefile 1.18 89/09/13 Copyr 1988 SMI ! 3: # ! 4: # Copyright (c) 1988 by Sun Microsystems, Inc. ! 5: # ! 6: # Description: ! 7: # Makefile for the NETlicense Report Generation Tool. ! 8: # ! 9: # Comments: ! 10: # 1) If you want to add a C file to this directory, just add it to the ! 11: # C_FILES macro. That is all you have to do. ! 12: # ! 13: ############################################################################### ! 14: ! 15: # ! 16: # Location of the root of the source hierarchy ! 17: # ! 18: SRC_DIR = . ! 19: ! 20: # ! 21: # ! 22: # Include the generic makefile ! 23: # ! 24: include $(SRC_DIR)/Makefile.inc ! 25: ! 26: # ! 27: # The report generation tool headers and product name ! 28: # ! 29: PRODUCT = $(ARCH)/bb $(ARCH)/xbb $(ARCH)/billboard $(ARCH)/xbillboard ! 30: ! 31: ! 32: # ! 33: # Misc stuff for test compilations ! 34: # ! 35: #MALLOC = /usr/lib/debug/malloc.o ! 36: MALLOC = ! 37: ! 38: # ! 39: # Location of the common files ! 40: # ! 41: COMMON_DIR = . ! 42: ! 43: # ! 44: # COMMON header files ! 45: # ! 46: ! 47: COMMON_HDR_FILES = server.h common.h ! 48: ! 49: # ! 50: # COMMON C files ! 51: # ! 52: COMMON_C_FILES = ! 53: ! 54: COMMON_OBJS = $(COMMON_C_FILES:.c=.o) ! 55: ! 56: ARCH_COMMON_OBJS = $(COMMON_OBJS:%=${COMMON_DIR}/${ARCH}/%) ! 57: ! 58: # Protocol files ! 59: PROTO_FILE = protocol.x ! 60: ! 61: # XDR Routines and Utilities ! 62: # ! 63: #PROTO_C_FILES = ! 64: ! 65: #PROTO_OBJS = $(PROTO_C_FILES:.c=.o) ! 66: ! 67: #ARCH_PROTO_OBJS = $(PROTO_OBJS:%=${ARCH}/%) ! 68: ! 69: LOCAL_CPPFLAGS = -I$(SRC_DIR) ! 70: ! 71: # ! 72: # Billboard Client files. ! 73: # ! 74: CLIENT_C_FILES= billboard.c billboard_util.c \ ! 75: protocol_xdr.c protocol_clnt.c ! 76: ! 77: CLIENT_OBJ_FILES = $(CLIENT_C_FILES:.c=.o) ! 78: ! 79: CLIENT_ARCH_OBJS = $(CLIENT_OBJ_FILES:%=${ARCH}/%) ! 80: ! 81: # ! 82: # BillBoard Server C files. ! 83: # ! 84: SERVER_C_FILES = bb_codata.c bb_hash.c bb_board.c bb_passwd.c \ ! 85: bb_phase.c bb_set.c bb_ip.c bb_list.c bb_grid.c \ ! 86: protocol_xdr.c ! 87: ! 88: SERVER_OBJ_FILES = $(SERVER_C_FILES:.c=.o) ! 89: ! 90: SERVER_ARCH_OBJS = $(SERVER_OBJ_FILES:%=${ARCH}/%) ! 91: ! 92: # ! 93: # Combined client and server files ! 94: # ! 95: C_FILES= bb_server.c billboard_rpc.c $(SERVER_C_FILES) $(CLIENT_C_FILES) ! 96: ! 97: ARCH_OBJS= $(SERVER_ARCH_OBJS) $(CLIENT_ARCH_OBJS) ! 98: ! 99: LINT_FILES = $(C_FILES:.c=.ln) ! 100: ! 101: # ! 102: # No nested targets although local targets will descend. ! 103: # ! 104: $(TARGETS): [email protected] ! 105: ! 106: # ! 107: # Local target entries ! 108: # ! 109: all.local debug.local profile.local: $(ARCH) $(PRODUCT) ! 110: ! 111: # ! 112: # link line. ! 113: # ! 114: ! 115: # ! 116: # NFS billboard server, PROGNUM is the RPC program number ! 117: # ! 118: $(ARCH)/bb: protocol.h $(SERVER_ARCH_OBJS) bb_server.c ! 119: $(COMPILE.c) -DPROGNUM=100073 bb_server.c -o $(ARCH)/bb_server.o ! 120: $(LINK.c) -o $@ $(SERVER_ARCH_OBJS) $(ARCH_COMMON_OBJS) \ ! 121: $(ARCH_UTILS_OBJS) $(ARCH_PROTO_OBJS) $(MALLOC) $(ARCH)/bb_server.o ! 122: ! 123: # ! 124: # X billboard server, PROGNUM is the RPC program number ! 125: # ! 126: $(ARCH)/xbb: protocol.h $(SERVER_ARCH_OBJS) bb_server.c ! 127: $(COMPILE.c) -DPROGNUM=100074 bb_server.c -o $(ARCH)/xbb_server.o ! 128: $(LINK.c) -o $@ $(SERVER_ARCH_OBJS) $(ARCH_COMMON_OBJS) \ ! 129: $(ARCH_UTILS_OBJS) $(ARCH_PROTO_OBJS) $(MALLOC) $(ARCH)/xbb_server.o ! 130: ! 131: # ! 132: # NFS billboard client program, PROGNUM is the RPC program number ! 133: # ! 134: $(ARCH)/billboard: protocol.h $(CLIENT_ARCH_OBJS) billboard_rpc.c ! 135: $(COMPILE.c) -DPROGNUM=100073 billboard_rpc.c -o $(ARCH)/billboard_rpc.o ! 136: $(LINK.c) -o $@ $(CLIENT_ARCH_OBJS) $(ARCH)/billboard_rpc.o ! 137: ! 138: # ! 139: # X billboard client program, PROGNUM is the RPC program number ! 140: # ! 141: $(ARCH)/xbillboard: protocol.h $(CLIENT_ARCH_OBJS) billboard_rpc.c ! 142: $(COMPILE.c) -DPROGNUM=100074 billboard_rpc.c -o $(ARCH)/xbillboard_rpc.o ! 143: $(LINK.c) -o $@ $(CLIENT_ARCH_OBJS) $(ARCH)/xbillboard_rpc.o ! 144: ! 145: clean.local: ! 146: $(RM) $(PRODUCT) $(ARCH)/*.o ! 147: ! 148: cflow.local: ! 149: $(CFLOW) $(CFLOWFLAGS) $(C_FILES) > $(CFLOW_OUT) ! 150: ! 151: lint.local: ! 152: $(LINT.c) $(C_FILES) ! 153: ! 154: install.local: ! 155: @if [ "$(DEBUG)" = "DEBUG" ] ;\ ! 156: then echo ;\ ! 157: echo "Making a debugging release!!!" ;\ ! 158: echo ;\ ! 159: $(MAKE) debug RELEASE=$(RELEASE) ;\ ! 160: else echo ;\ ! 161: echo "Making all the products ..." ;\ ! 162: echo ;\ ! 163: $(MAKE) all RELEASE=$(RELEASE) ;\ ! 164: fi ! 165: -mkdir -p $(DESTDIR_BIN) > /dev/null 2>&1 ! 166: cp $(PRODUCT) $(DESTDIR_BIN) ! 167: ! 168: # ! 169: # Set the release directory ! 170: # ! 171: REL_SRC = $(DESTDIR_SRC) ! 172: ! 173: release.local: ! 174: $(MAKE) clean RELEASE=$(RELEASE) DESTDIR=$(DESTDIR) ! 175: $(MAKE) install RELEASE=$(RELEASE) DESTDIR=$(DESTDIR) ! 176: # ! 177: # Make the release directory if necessary and copy the source ! 178: # ! 179: if [ ! -d $(REL_SRC) ] ;\ ! 180: then mkdir -p $(REL_SRC) ;\ ! 181: cp Makefile.inc Makefile $(C_FILES) $(PROTO_FILE) $(COMMON_HDR_FILES) $(REL_SRC) ;\ ! 182: fi ! 183: ! 184: sccs_check.local: ! 185: -sccs check >> $(SCCS_CHECK_FILE) ! 186: -echo "Directory: ./lat/rgt" >> $(SCCS_VERS_FILE) ! 187: -sccs prs $(SCCS_VERS_ARGS) SCCS >> $(SCCS_VERS_FILE) ! 188: ! 189: tags.local: $(C_FILES) $(COMMON_HDR_FILES) ! 190: ctags -tw $(C_FILES) $(COMMON_HDR_FILES) ! 191: ! 192: # ! 193: # Local file dependencies ! 194: # ! 195: #proto_mk: FORCE ! 196: # cd $(PROTO_DIR); $(MAKE) $(TARGET) RELEASE=$(RELEASE) DESTDIR=$(DESTDIR) ! 197: ! 198: #common_mk: FORCE ! 199: # cd $(COMMON_DIR); $(MAKE) $(TARGET) RELEASE=$(RELEASE) DESTDIR=$(DESTDIR) ! 200: ! 201: $(ARCH_OBJS): $(ARCH) ! 202: ! 203: $(ARCH): ! 204: -mkdir -p $@ ! 205: ! 206: $(ARCH)/%.o: %.c ! 207: $(COMPILE.c) -o $@ $< ! 208: ! 209: protocol.h: $(PROTO_FILE) ! 210: rpcgen -h -o $@ $(PROTO_FILE) ! 211: ! 212: protocol_clnt.c: $(PROTO_FILE) ! 213: rpcgen -l -o $@ $(PROTO_FILE) ! 214: ! 215: protocol_xdr.c: $(PROTO_FILE) ! 216: rpcgen -c -o $@ $(PROTO_FILE) ! 217: ! 218: #protocol_svc.c: $(PROTO_FILE) ! 219: # rpcgen -m -o $@ $(PROTO_FILE) ! 220: ! 221: FORCE: ! 222: ! 223: depend.local: makedep ! 224: echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep ! 225: echo '$$r makedep' >>eddep ! 226: echo 'w' >>eddep ! 227: cp Makefile Makefile.bak ! 228: ex - Makefile < eddep ! 229: rm eddep makedep makedep1 makedeperrs ! 230: ! 231: makedep: $(C_FILES) $(COMMON_HDR_FILES) ! 232: @cat /dev/null >makedep ! 233: (for i in ${C_FILES} ; do \ ! 234: ${CPP} -M ${CPPFLAGS} $$i | sed \ ! 235: -e 's,^\(.*\)\.o:,\1.o \1.L:,' >>makedep1; done) \ ! 236: 2>makedeperrs ! 237: ${AWK} ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \ ! 238: else { if (length(rec $$3) > 78) { print rec; rec = $$0; } \ ! 239: else rec = rec " " $$3 } } \ ! 240: END { print rec } ' makedep1 > makedep ! 241: @cat makedeperrs ! 242: @(if [ -s makedeperrs ]; then false; fi) ! 243: ! 244: # DO NOT DELETE THIS LINE -- make depend uses it ! 245:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.