"Fossies" - the Fresh Open Source Software Archive

Member "xosview-1.23/Makefile" (11 Jul 2020, 3298 Bytes) of package /linux/misc/xosview-1.23.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "Makefile": 1.19_vs_1.20.

    1 -include .config
    2 
    3 AWK ?= awk
    4 INSTALL ?= install
    5 PLATFORM ?= linux
    6 
    7 # Installation paths
    8 
    9 PREFIX ?= /usr/local
   10 
   11 BINDIR ?= $(PREFIX)/bin
   12 MANDIR ?= $(PREFIX)/share/man
   13 XDGAPPSDIR ?= $(PREFIX)/share/applications
   14 ICONDIR ?= $(PREFIX)/share/icons/hicolor
   15 
   16 # Optional build arguments; user may wish to override
   17 
   18 OPTFLAGS ?= -Wall -O3
   19 
   20 # Required build arguments
   21 
   22 CPPFLAGS += $(OPTFLAGS) -I. -MMD
   23 LDLIBS += -lX11 -lXpm
   24 
   25 OBJS = Host.o \
   26 	Xrm.o \
   27 	bitfieldmeter.o \
   28 	bitmeter.o \
   29 	defaultstring.o \
   30 	fieldmeter.o \
   31 	fieldmeterdecay.o \
   32 	fieldmetergraph.o \
   33 	llist.o \
   34 	main.o \
   35 	meter.o \
   36 	xosview.o \
   37 	xwin.o
   38 
   39 # Optional platform type
   40 
   41 ifeq ($(PLATFORM), linux)
   42 ARCH = $(shell uname -m)
   43 OBJS += sensorfieldmeter.o \
   44 	linux/MeterMaker.o \
   45 	linux/btrymeter.o \
   46 	linux/cpumeter.o \
   47 	linux/diskmeter.o \
   48 	linux/intmeter.o \
   49 	linux/intratemeter.o \
   50 	linux/lmstemp.o \
   51 	linux/loadmeter.o \
   52 	linux/memmeter.o \
   53 	linux/netmeter.o \
   54 	linux/nfsmeter.o \
   55 	linux/pagemeter.o \
   56 	linux/raidmeter.o \
   57 	linux/serialmeter.o \
   58 	linux/swapmeter.o \
   59 	linux/wirelessmeter.o \
   60 	linux/acpitemp.o
   61 ifeq ($(findstring 86,$(ARCH)),86)
   62 OBJS += linux/coretemp.o
   63 endif
   64 CPPFLAGS += -Ilinux/
   65 LDLIBS += -lm
   66 endif
   67 
   68 ifeq ($(PLATFORM), bsd)
   69 ARCH = $(shell uname -m)
   70 OBJS += sensorfieldmeter.o \
   71         bsd/MeterMaker.o \
   72         bsd/btrymeter.o \
   73         bsd/cpumeter.o \
   74         bsd/diskmeter.o \
   75         bsd/intmeter.o \
   76         bsd/intratemeter.o \
   77         bsd/kernel.o \
   78         bsd/loadmeter.o \
   79         bsd/memmeter.o \
   80         bsd/netmeter.o \
   81         bsd/pagemeter.o \
   82         bsd/swapmeter.o \
   83         bsd/sensor.o
   84 ifeq ($(ARCH),$(filter $(ARCH),i386 amd64 x86_64))
   85 OBJS += bsd/coretemp.o
   86 endif
   87 CPPFLAGS += -Ibsd/
   88 LDLIBS += -lm
   89 endif
   90 
   91 ifeq ($(PLATFORM), irix65)
   92 OBJS += irix65/MeterMaker.o \
   93         irix65/cpumeter.o \
   94         irix65/diskmeter.o \
   95         irix65/gfxmeter.o \
   96         irix65/loadmeter.o \
   97         irix65/memmeter.o \
   98         irix65/sarmeter.o
   99 CPPFLAGS += -Iirix65/
  100 endif
  101 
  102 ifeq ($(PLATFORM), sunos5)
  103 OBJS += sunos5/MeterMaker.o \
  104         sunos5/cpumeter.o \
  105         sunos5/diskmeter.o \
  106         sunos5/loadmeter.o \
  107         sunos5/memmeter.o \
  108         sunos5/netmeter.o \
  109         sunos5/pagemeter.o \
  110         sunos5/swapmeter.o \
  111         sunos5/intratemeter.o
  112 CPPFLAGS += -Isunos5/ -Wno-write-strings
  113 LDLIBS += -lkstat -lnsl -lsocket
  114 INSTALL = ginstall
  115 endif
  116 
  117 ifeq ($(PLATFORM), gnu)
  118 OBJS += gnu/get_def_pager.o \
  119 	gnu/loadmeter.o \
  120 	gnu/memmeter.o \
  121 	gnu/MeterMaker.o \
  122 	gnu/pagemeter.o \
  123 	gnu/swapmeter.o
  124 CPPFLAGS += -Ignu/
  125 endif
  126 
  127 DEPS := $(OBJS:.o=.d)
  128 
  129 xosview:	$(OBJS)
  130 		$(CXX) $(LDFLAGS) -o $@ $^ $(LDLIBS)
  131 
  132 defaultstring.cc:	Xdefaults defresources.awk
  133 		$(AWK) -f defresources.awk Xdefaults > defaultstring.cc
  134 
  135 Xrm.o:		CXXFLAGS += -Wno-write-strings
  136 
  137 .PHONY:		dist install clean
  138 
  139 dist:
  140 		./mkdist $(VERSION)
  141 
  142 install:	xosview
  143 		$(INSTALL) -d $(DESTDIR)$(BINDIR)
  144 		$(INSTALL) -d $(DESTDIR)$(MANDIR)/man1
  145 		$(INSTALL) -d $(DESTDIR)$(XDGAPPSDIR)
  146 		$(INSTALL) -d $(DESTDIR)$(ICONDIR)/32x32/apps
  147 		$(INSTALL) -m 755 xosview $(DESTDIR)$(BINDIR)/xosview
  148 		$(INSTALL) -m 644 xosview.1 $(DESTDIR)$(MANDIR)/man1/xosview.1
  149 		$(INSTALL) -m 644 xosview.desktop $(DESTDIR)$(XDGAPPSDIR)
  150 		$(INSTALL) -m 644 xosview.png $(DESTDIR)$(ICONDIR)/32x32/apps
  151 
  152 clean:
  153 		rm -f xosview $(OBJS) $(DEPS) defaultstring.cc
  154 
  155 -include $(DEPS)