1#ident "@(#)rules.top 1.27 21/05/26 " 2########################################################################### 3# Written 1996 by J. Schilling 4########################################################################### 5# 6# Rules that should be included at top of every Makefile 7# This is the general purpose C-language version 8# 9########################################################################### 10# Copyright (c) J. Schilling 11########################################################################### 12# The contents of this file are subject to the terms of the 13# Common Development and Distribution License, Version 1.0 only 14# (the "License"). You may not use this file except in compliance 15# with the License. 16# 17# See the file CDDL.Schily.txt in this distribution for details. 18# A copy of the CDDL is also available via the Internet at 19# http://www.opensource.org/licenses/cddl1.txt 20# 21# When distributing Covered Code, include this CDDL HEADER in each 22# file and include the License file CDDL.Schily.txt from this distribution. 23########################################################################### 24# 25# Make sure this becomes the default target 26# 27########################################################################### 28all: 29 30########################################################################### 31# 32# Use $(NOECHO) before all make rule commands to be able to enable 33# echoing by calling "make NOECHO= " 34# 35########################################################################### 36NOECHO=@ 37 38########################################################################### 39# 40# First make sure that all symlinks in $(SRCROOT)/$(RULESDIR)/ are present 41# 42# $(DUMMY_LNK) is needed to work around a Sun make bug that has been 43# fixed with Solaris 11 but that is present for all old Solaris versions. 44# 45########################################################################### 46_DUMMY_LNK= $(SRCROOT)/$(RULESDIR)/ldummy.lnk 47DUMMY_LNK= $(_DUMMY_LNK:./%=%) 48 49$(DUMMY_LNK): 50 $(NOECHO)echo " ==> MAKING SYMLINKS in $(SRCROOT)/$(RULESDIR)/" && \ 51 cd $(SRCROOT)/$(RULESDIR) && sh ./MKLINKS 52 $(NOECHO)echo " ==> MAKING SYMLINKS in $(SRCROOT)/TEMPLATES/" && \ 53 cd $(SRCROOT)/TEMPLATES && sh ./MKLINKS 54 55include $(DUMMY_LNK) 56 57########################################################################### 58# 59# SunPro make and gmake both include a COMPILE.c in the built in rules. 60# Clear this here, to avoid trouble. We are still able to use COMPILE.c= 61# command line macros to overwrite this. 62# 63########################################################################### 64COMPILE.c= 65 66########################################################################### 67# 68# SunPro make and gmake both include a COMPILE.cc in the built in rules. 69# Clear this here, to avoid trouble. We are still able to use COMPILE.cc= 70# command line macros to overwrite this. 71# 72########################################################################### 73COMPILE.cc= 74 75########################################################################### 76# 77# Various flags may be set in the default rules from various make programs 78# Clear this here, to avoid trouble. We are still able to use make command 79# line macros to overwrite this. 80# 81########################################################################### 82ARFLAGS= 83ASFLAGS= 84CFLAGS= 85CPPFLAGS= 86LDFLAGS= 87LFLAGS= 88YFLAGS= 89 90########################################################################### 91# 92# Include global language independent macros 93# 94########################################################################### 95include $(SRCROOT)/$(RULESDIR)/rules1.top 96 97########################################################################### 98# 99# Workaround for GNU make design bug (include does not trigger rule evaluation) 100# A correctly working "make" did create the symlinks already while 101# including "ldummy.lnk" above. 102# 103########################################################################### 104$(SRCROOT)/$(RULESDIR)/$(XARCH).rul: $(SRCROOT)/$(RULESDIR)/ldummy.lnk 105 106########################################################################### 107# 108# Include platform dependent macros for C-language here. 109# 110# If a project needs other languages too, additional rules may be defined. 111# These additional rules should be placed in a file that uses a hierarchy 112# similar to rules.top and mey be called e.g. yacc.top. 113# 114########################################################################### 115include $(SRCROOT)/$(RULESDIR)/$(XARCH).rul 116 117########################################################################### 118# 119# Include global autofonfiguration rules 120# 121########################################################################### 122include $(SRCROOT)/$(RULESDIR)/rules.cnf 123