[go: up one dir, main page]

File: Makefile

package info (click to toggle)
s390-tools 2.15.1-2
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 8,216 kB
  • sloc: ansic: 130,144; sh: 9,397; cpp: 8,359; perl: 2,517; makefile: 1,960; asm: 1,016
file content (64 lines) | stat: -rw-r--r-- 1,381 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

include ../common.mak

ifeq (${HAVE_FUSE},0)

all:
	$(SKIP) HAVE_FUSE=0

install:
	$(SKIP) HAVE_FUSE=0

else

check_dep:
	$(call check_dep, \
		"hmcdrvfs", \
		"fuse.h", \
		"fuse-devel or libfuse-dev", \
		"HAVE_FUSE=0")

ifneq ($(shell sh -c 'command -v pkg-config'),)
FUSE_CFLAGS = $(shell pkg-config --silence-errors --cflags fuse)
FUSE_LDLIBS = $(shell pkg-config --silence-errors --libs fuse)
else
FUSE_CFLAGS = -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse
FUSE_LDLIBS = -lfuse
endif
ALL_CFLAGS += -DFUSE_USE_VERSION=26 -D_LARGEFILE_SOURCE $(FUSE_CFLAGS)
LDLIBS += $(FUSE_LDLIBS) -lpthread -lrt -ldl -lm

OBJECTS = hmcdrvfs.o

libs = $(rootdir)/libutil/libutil.a

all: check_dep hmcdrvfs

$(OBJECTS): Makefile

hmcdrvfs: $(OBJECTS) $(libs)

install: all install-scripts
	$(INSTALL) -g $(GROUP) -o $(OWNER) -m 755 hmcdrvfs \
		$(DESTDIR)$(USRBINDIR)
	$(INSTALL) -g $(GROUP) -o $(OWNER) -m 644 hmcdrvfs.1 \
		$(DESTDIR)$(MANDIR)/man1
	$(INSTALL) -g $(GROUP) -o $(OWNER) -m 644 lshmc.8 \
		$(DESTDIR)$(MANDIR)/man8

install-scripts: lshmc
	@for i in $^; do \
		cat $$i | \
		sed -e 's/%S390_TOOLS_VERSION%/$(S390_TOOLS_RELEASE)/' \
		>$(DESTDIR)$(USRSBINDIR)/$$i; \
		chown $(OWNER).$(GROUP) $(DESTDIR)$(USRSBINDIR)/$$i; \
		chmod 755 $(DESTDIR)$(USRSBINDIR)/$$i; \
	done

endif

clean:
	rm -f hmcdrvfs *.o

.PHONY: all install install-scripts clean check_dep