home *** CD-ROM | disk | FTP | other *** search
- #
- # Build flags which are used by various components
- #
-
- ifeq ($(SYSTEM),)
-
- SYSTEM := $(strip $(shell PATH=$$PATH:.:..:../..:../../.. system ))
-
-
- # Compilation parameters
- # (don't try to use gcc if the machine isn't supported yet)
- # don't use gcc on Sun-4 until we resolve structure pass/return incompatibility
-
- ifneq ($(findstring ibmrt,$(SYSTEM)),ibmrt)
- ifneq ($(findstring mipsel,$(SYSTEM)),mipsel)
- ifneq ($(findstring sun4,$(SYSTEM)),sun4)
- CC := gcc
- endif
- endif
- endif
-
- #
- # Sun-3 floating-point options; replace 68881 with soft or fpa as appropriate
- #
-
- ifeq ($(findstring sun3,$(SYSTEM)),sun3)
-
- FLOAT_OPTION = f68881
-
- ifeq ($(findstring os4,$(SYSTEM)),os4)
-
- FLIB = /usr/lib/$(FLOAT_OPTION).il
-
- else
-
- FLIB = /usr/lib/$(FLOAT_OPTION)/libm.il
-
- endif
-
- endif
-
- OPT = -g
- OPTG = -g -W
-
- ifeq ($(findstring os4,$(SYSTEM)),os4)
- ifeq ($(findstring -g,$(OPTG)),-g)
- ifeq ($(findstring gcc,$(CC)),gcc)
- override LDFLAGS := -g -static
- else
- override LDFLAGS := -g -Bstatic
- endif
- endif
- endif
-
- DEFINES =
-
-
- # Listing variables and flags
-
- TROFF = ptroff
- VGRIND = vgrind
-
- GRIND = $(VGRIND) -d vgrindefs
-
-
- # Installation tools
-
- INSTALL=install -c
-
- ifeq ($(findstring os4,$(SYSTEM)),os4)
- RANLIB=ranlib -t
- else
- RANLIB=ranlib
- endif
-
-
- # Installation locations
-
- MANDIR = /usr/local/man
- BINDIR = /usr/local/bin
- LIBDIR = /usr/local/lib
- INCDIR = /usr/local/include
-
- endif
-
-
- # Pattern rules
-
- %.ps: %.c
- $(VGRIND) -lC -t $< > $@
-
- %.ps: %.h
- $(VGRIND) -lC -t $< > $@
-
- # Installation pattern rules
-
- %/bin: %
- mkdir $@
-
- $(BINDIR)/%: %
- $(INSTALL) $< $@
-
- %/lib: %
- mkdir $@
-
- $(LIBDIR)/%: %
- $(INSTALL) $< $@
- $(RANLIB) $@
- @chmod -x $@
-
- %/include: %
- mkdir $@
-
- $(INCDIR)/%: %
- $(INSTALL) $< $@
- @chmod -x $@
-
- %/man: %
- mkdir $@
-
- $(MANDIR)/man1/%: %
- $(INSTALL) $< $@
- @chmod -x $@
-
- $(MANDIR)/man3/%: %
- $(INSTALL) $< $@
- @chmod -x $@
-