CC = cc
CP = copy
%.obj: %.c
$(CC) $(CFLAGS)/obj=$@ $<
ifeq ($(CC),cc)
CFLAGS = $(defines) /include=([],[.glob])/prefix=all/standard=relaxed
else
CFLAGS = $(defines) /include=([],[.glob])
endif
LDFLAGS =
ifeq ($(CC),cc)
defines = /define=("unlink=remove","HAVE_CONFIG_H","VMS","allocated_variable_expand_for_file=alloc_var_expand_for_file")
else
ifeq ($(ARCH),VAX)
defines = /define=("HAVE_CONFIG_H","GCC_IS_NATIVE","VAX")
else
defines = /define=("HAVE_CONFIG_H","GCC_IS_NATIVE")
endif
endif
LOAD_AVG = /define="NO_LDAV"
ARCHIVES = ,ar.obj,arscan.obj
ARCHIVES_SRC = ar.c arscan.c
ifeq ($(CC),cc)
CRT0 =
else
LOADLIBES =,gnu_cc_library:libgcc.olb/lib
endif
REMOTE =
extras = ,signame.obj,remote-stub.obj,vmsfunctions.obj,vmsify.obj
glob = ,[.glob]glob.obj,[.glob]fnmatch.obj
getopt = ,getopt.obj,getopt1.obj
bindir = []
mandir = []
manext = 1
objs = commands.obj,job.obj,dir.obj,file.obj,misc.obj,\
main.obj,read.obj,remake.obj,rule.obj,implicit.obj,\
default.obj,variable.obj,expand.obj,function.obj,\
vpath.obj,version.obj$(ARCHIVES)$(ALLOCA)$(extras)$(getopt)$(glob)
srcs = commands.c job.c dir.c file.c misc.c \
main.c read.c remake.c rule.c implicit.c \
default.c variable.c expand.c function.c \
vpath.c version.c vmsfunctions.c vmsify.c $(ARCHIVES_SRC) $(ALLOCASRC) \
commands.h dep.h filedef.h job.h make.h rule.h variable.h
.PHONY: all doc
all: config.h make.exe
doc: make.info make.dvi
make.exe: $(objs)
$(LD)$(LDFLAGS)/exe=$@ $^$(LOADLIBES)$(CRT0)
.PHONY: clean realclean
clean:
$$ purge [...]
-$(RM) make.exe;,*.obj;
-$(RM) *.opt;
-$(RM) [.glob]*.obj;
commands.obj: commands.c make.h dep.h commands.h filedef.h variable.h job.h
job.obj: job.c make.h commands.h job.h filedef.h variable.h
dir.obj: dir.c make.h
file.obj: file.c make.h commands.h dep.h filedef.h variable.h
misc.obj: misc.c make.h dep.h
main.obj: main.c make.h commands.h dep.h filedef.h variable.h job.h
read.obj: read.c make.h commands.h dep.h filedef.h variable.h
remake.obj: remake.c make.h commands.h job.h dep.h filedef.h
rule.obj: rule.c make.h commands.h dep.h filedef.h variable.h rule.h
implicit.obj: implicit.c make.h rule.h dep.h filedef.h
default.obj: default.c make.h rule.h dep.h filedef.h commands.h variable.h
variable.obj: variable.c make.h commands.h variable.h dep.h filedef.h
expand.obj: expand.c make.h commands.h filedef.h variable.h
function.obj: function.c make.h variable.h dep.h commands.h job.h
vpath.obj: vpath.c make.h filedef.h variable.h
version.obj: version.c config.h
arscan.obj: arscan.c
ar.obj: ar.c make.h filedef.h
signame.obj: signame.c
remote-stub.obj: remote-stub.c
[.glob]glob.obj: [.glob]glob.c
[.glob]fnmatch.obj: [.glob]fnmatch.c
getopt.obj: getopt.c
getopt1.obj: getopt1.c
vmsfunctions.obj: vmsfunctions.c make.h vmsdir.h
vmsify.obj: vmsify.c make.h
config.h: config.h-vms
$(CP) $< $@