



# mgen.control : Diese Datei steuert die Erzeugung der Makefiles
# Diese Erzeugung ist durch Regelsdateien und Beschriebungsdateien
# konfiguriert.

# Don't use implicit rules!
MAKEFLAGS=--no-builtin-rules --no-print-directory



# Die Regeldateien sollte man zuerst includen





# Parameters, die durch den Aufruf von MGEN festgelegt sind. 
CONFIG=/home/projects/maker/Ipsen94
PROJECTDIR=/home/projects/rgras/R32/rif/inc
MAKEFILEDIR=/home/projects/rgras/R32/rif/inc/xdr

# Diese makefile-Dateien sind zur Laufzeit benutzt

ifeq ($(wildcard $(CONFIG)/makefile.global.variables),$(CONFIG)/makefile.global.variables)
  include $(CONFIG)/makefile.global.variables
endif


ifeq ($(wildcard $(PROJECTDIR)/makefile.forsubdirs.variables),$(PROJECTDIR)/makefile.forsubdirs.variables)
  include $(PROJECTDIR)/makefile.forsubdirs.variables
endif


ifeq ($(wildcard $(MAKEFILEDIR)/makefile.variables),$(MAKEFILEDIR)/makefile.variables)
  include $(MAKEFILEDIR)/makefile.variables
endif

# You may override the definitions of $(CONFIG)/makefile.global.variables 
# within $(PROJECTDIR)/makefile.project.variables or 
# within $(SRCDIR)/makefile.variables

# Das erste Target !
all.all::



# Diese Targets mussen vor allen anderen stehen,
# sind aber durch Konfigurationsdateien gesteuert (deswegen diverted)



.PHONY : all.all all

all.all::all



.PHONY : local.all local

local.all: local



.PHONY : local.def.all local.def

local.def.all: local.def



.PHONY : install.all install

install.all: install



.PHONY : clean.all clean

clean.all: clean



.PHONY : depend.all depend

depend.all: depend



.PHONY : def.all def

def.all: def



.PHONY : inc.all inc

inc.all: inc










.PHONY : all empty

all::gen


.PHONY : gen pregen

gen::pregen $(GENERATEDFILES)

pregen:: 




.PHONY : clean clean.local clean.debug

clean::clean.local 

clean.local::
	-$(RM) $(RMFLAGS) $(FILESTOCLEAN)
















empty::


.PHONY : mgen

makefile : mgen.makefile   \
  \
/home/projects/maker/Ipsen94/mgen.global.rules  /home/projects/maker/Ipsen94/mgen.control 
	$(MGENCALL)

mgen mgen.all mgen.makefile /home/projects/rgras/R32/rif/inc/mgen.forsubdirs.makefile mgen.rules /home/projects/rgras/R32/rif/inc/mgen.forsubdirs.rules /home/projects/maker/Ipsen94/mgen.global.rules /home/projects/maker/Ipsen94/mgen.control : 
	$(MGENCALL)



mlint:
	cd $(SRCDIR) && $(MLINT) *.mod

beep::
	@$(BEEP)


# Und jetzt die Konfigurationsdateien benutzen


%.h : %.x
	$(RM) -f $@
	$(RPCGEN) $(RFLAGS) -h -o $@ $< 
	$(CHMOD) -w $@



# Diese Datei, die zur Laufzeit benutzt wird, soll ganz am Ende stehen

ifeq ($(wildcard $(CONFIG)/makefile.pattern.rules),$(CONFIG)/makefile.pattern.rules)
  include $(CONFIG)/makefile.pattern.rules
endif




