File: Rules.pfm

package info (click to toggle)
papi 5.7.0+dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 9,856 kB
  • sloc: ansic: 93,265; fortran: 3,338; xml: 2,460; makefile: 815; sh: 290
file content (67 lines) | stat: -rw-r--r-- 1,659 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# $Id$

DESCR = "Linux with PFM $(VERSION) kernel support and library"

ifneq (,$(wildcard /etc/sgi-release))
	PFM_PREFIX ?= /usr
	ALTIX ?= -DALTIX
endif

ifeq (,$(PFM_LIB_PATH))
ifeq (,$(PFM_ROOT))
    PFM_ROOT := ./libpfm-$(VERSION)
endif
	PFM_LIB_PATH := $(PFM_ROOT)/lib
endif
ifeq (,$(PFM_INC_PATH))
ifeq (,$(PFM_ROOT))
    PFM_ROOT := ./libpfm-$(VERSION)
endif
    PFM_INC_PATH := $(PFM_ROOT)/include
endif

OPTIM := $(CFLAGS)
CFLAGS-3.y := -DPFM30 
CFLAGS += -I$(PFM_INC_PATH) $(ALTIX) $(CFLAGS-$(VERSION))
MISCHDRS += linux-lock.h mb.h
SHLIBDEPS = -Bdynamic -L$(PFM_LIB_PATH) -lpfm
PFM_OBJS = $(shell $(AR) t $(PFM_LIB_PATH)/libpfm.a 2>/dev/null)
MISCOBJS = $(PFM_OBJS) $(MISCSRCS:.c=.o)

ifeq (,$(PFM_OBJS))
$(PFM_LIB_PATH)/libpfm.a:
ifneq (,${PFM_ROOT})
ifeq (1, $(HAVE_NO_OVERRIDE_INIT))
	$(MAKE) -C $(PFM_ROOT) ARCH="$(ARCH)" CC="$(CC)" OPTIM="$(OPTIM)" CONFIG_PFMLIB_OLD_PFMV2="$(PFM_OLD_PFMV2)" -Wno-override-init lib
else
	$(MAKE) -C $(PFM_ROOT) ARCH="$(ARCH)" CC="$(CC)" OPTIM="$(OPTIM)" CONFIG_PFMLIB_OLD_PFMV2="$(PFM_OLD_PFMV2)" lib
endif
else
	@echo '$@ not installed!'; exit 1
endif
	$(MAKE)
endif

include Makefile.inc

config.h:
	@echo 'Please clobber your build and run ./configure."

$(PFM_OBJS): 
	$(AR) xv $(PFM_LIB_PATH)/libpfm.a

native_clean:
	-rm -f $(MISCOBJS) 
ifneq (,${PFM_ROOT})
	$(MAKE) -C $(PFM_ROOT) clean
endif

native_install:
ifneq (,${PFM_ROOT})
	$(MAKE) -C $(PFM_ROOT) CONFIG_PFMLIB_OLD_PFMV2="$(PFM_OLD_PFMV2)" DESTDIR=$(DESTDIR) PREFIX=$(PREFIX) install_prefix=$(PREFIX) LIBDIR=$(LIBDIR) INCDIR=$(INCDIR) MANDIR=$(MANDIR) install
endif

native_clobber:
ifneq (,${PFM_ROOT})
	 $(MAKE) -C $(PFM_ROOT) distclean
endif