include ../../makeinit.vms DEFINES = HAVE_STDLIB_H=1,LISTEN=1 OBJLIB = $(IMAGE_NAME).$(OLB_SUFFIX) # Alpha only compiler flags. ifdef ALPHA CFLAGS += /pointer_size=short PTRSIZ = 32 DEST = [.Alpha] endif # Itanium only compiler flags. ifdef IA64 CFLAGS += /pointer_size=short PTRSIZ = 32 DEST = [.ia64] endif # VAX only compiler flags. ifdef VAX CFLAGS = PTRSIZ = DEST = [.VAX] endif # Compiler flags we always want CFLAGS += /prefix=all /include=([],krb$$root:[include]) LFLAGS = /exe=$(DEST)/map=$(DEST)/full ifdef DEBUG CFLAGS += /debug/nooptimize/lis/show=all DEFINES += ,DEBUG=1 LFLAGS += /debug else LFLAGS += /nodebug ### /notraceback endif CFLAGS += /define=($(DEFINES))/obj=$@ CSRCS = client.c server.c #Rules OBJS = $(CSRCS:.c=.$(OBJ_SUFFIX)) TARGETS = $(DEST)client.exe $(DEST)server.exe all: com_init $(TARGETS) com_init: ! $(DEST)client.exe: $(DEST)client.obj link $(LFLAGS) $(DEST)client.obj,[]krblnk$(PTRSIZ).opt/option $(DEST)server.exe: $(DEST)server.obj link $(LFLAGS) $(DEST)server.obj,[]krblnk$(PTRSIZ).opt/option $(DEST)client.obj: client.c cc $(CFLAGS) $? $(DEST)server.obj: server.c cc $(CFLAGS) $? $(OBJLIB): $(OBJS) @if f$$search("$@") .eqs. "" then library /create $@ library /replace /log $@ $? clean: @if f$$search("$(DEST)*.$(OBJ_SUFFIX)") .nes. "" then delete /log $(DEST)*.$(OBJ_SUFFIX);* @if f$$search("$(DEST)*.$(SHR_SUFFIX)") .nes. "" then delete /log $(DEST)*.$(SHR_SUFFIX);* @if f$$search("$(DEST)*.lis") .nes. "" then delete /log $(DEST)*.lis;* @if f$$search("$(DEST)*.map") .nes. "" then delete /log $(DEST)*.map;* @if f$$search("$(DEST)$(OBJLIB)") .nes. "" then delete /log $(DEST)$(OBJLIB);* help: @$(ECHO) " gmake -? - Displays general Gmake command line help" @$(ECHO) " gmake help - Displays help for using/typing gmake in this directory" @$(ECHO) "" @$(ECHO) " gmake - Builds the MIT user_user client and server" @$(ECHO) " gmake ""DEBUG=1"" - Builds everything with DEBUG" @$(ECHO) "" @$(ECHO) " gmake clean - Cleans the user_user directory"