# Defaults to Alpha architecture. Use "VAX=1" for a VAX build. ifndef VAX ifndef IA64 ALPHA = 1 endif endif OBJ_SUFFIX = obj OLB_SUFFIX = olb SHR_SUFFIX = exe OBJLIB = $(IMAGE_NAME).$(OLB_SUFFIX) EMPTY := SPACE := $(EMPTY) $(EMPTY) COMMA := , ECHO := write sys$$output CP := copy /log NL := nl: DEFINES = HAVE_STDLIB_H=1 # Alpha only compiler flags. ifdef ALPHA CFLAGS += /pointer_size=short PTRSIZ = 32 DEST = [.alpha] endif # VAX only compiler flags. ifdef VAX CFLAGS = PTRSIZ = DEST = [.vax] endif # Itanium only compiler flags. ifdef IA64 CFLAGS += /pointer_size=short PTRSIZ = 32 DEST = [.ia64] endif IMAGE_NAME = sclient LFLAGS = /exe=$(DEST) # Compiler flags we always want CFLAGS += /obj=$@/prefix=all /include=([],[-],krb$$root:[include]) ifdef DEBUG CFLAGS += /debug/nooptimize/lis/show=all DEFINES += ,"DEBUG=1" LFLAGS += /debug/map=$(DEST)/full else LFLAGS += /nodebug ### /notraceback endif CFLAGS += /define=($(DEFINES)) CSRCS = sclient.C BASE_H_FILES = [-]SAMPLE.H #Rules OBJS = $(CSRCS:.c=.$(OBJ_SUFFIX)) TARGETS = $(DEST)sclient.exe all: $(TARGETS) $(DEST)sclient.exe: $(DEST)sclient.obj link $(LFLAGS) $(DEST)sclient.obj,[]krblnk$(PTRSIZ).opt/option $(DEST)sclient.obj: sclient.c cc $(CFLAGS) $? $(DEST)$(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 sclient in the current directory" @$(ECHO) " gmake ""DEBUG=1"" - Builds everything with DEBUG" @$(ECHO) "" @$(ECHO) " gmake clean - Cleans this current directory"