[go: up one dir, main page]

File: Makefile

package info (click to toggle)
s390-tools 1.25.0-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 4,564 kB
  • ctags: 9,593
  • sloc: ansic: 53,784; sh: 8,627; cpp: 8,191; perl: 3,712; makefile: 989; asm: 654
file content (92 lines) | stat: -rw-r--r-- 3,226 bytes parent folder | download
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
include ../common.mak

CPPFLAGS += -I../include -DNDEBUG
CFLAGS   += -Wundef -Wstrict-prototypes -Wno-trigraphs
CXXFLAGS += -Wundef -Wno-trigraphs

TARGETS = ziomon_util ziomon_mgr ziomon_zfcpdd ziorep_utilization ziorep_traffic
all: $(TARGETS)

ziomon_mgr_main.o: ziomon_mgr.c
	$(CC) -DWITH_MAIN $(CFLAGS) $(CPPFLAGS) -c $< -o $@
ziomon_mgr: LDLIBS += -lm
ziomon_mgr: ziomon_dacc.o ziomon_util.o ziomon_mgr_main.o ziomon_tools.o \
	    ziomon_zfcpdd.o ziomon_msg_tools.o
	$(LINK) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@

ziomon_util_main.o: ziomon_util.c ziomon_util.h
	$(CC) -DWITH_MAIN $(CFLAGS) $(CPPFLAGS) -c $< -o $@
ziomon_util: LDLIBS += -lm
ziomon_util: ziomon_util_main.o ziomon_tools.o
	$(LINK) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@

ziomon_zfcpdd_main.o: ziomon_zfcpdd.c ziomon_zfcpdd.h
	$(CC) -DWITH_MAIN $(CFLAGS) $(CPPFLAGS) -c $< -o $@
ziomon_zfcpdd: LDLIBS += -lm -lrt -lpthread
ziomon_zfcpdd: ziomon_zfcpdd_main.o ziomon_tools.o
	$(LINK) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@

ziorep_traffic: ziorep_traffic.o ziorep_framer.o ziorep_frameset.o \
		ziorep_printers.o ziomon_dacc.o ziomon_util.o \
		ziomon_msg_tools.o ziomon_tools.o ziomon_zfcpdd.o \
		ziorep_cfgreader.o ziorep_collapser.o ziorep_utils.o \
		ziorep_filters.o
	$(LINKXX) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@

ziorep_utilization: ziorep_utilization.o ziorep_framer.o ziorep_frameset.o \
		    ziorep_printers.o ziomon_dacc.o ziomon_util.o \
		    ziomon_msg_tools.o ziomon_tools.o ziomon_zfcpdd.o \
		    ziorep_cfgreader.o ziorep_collapser.o ziorep_utils.o \
		    ziorep_filters.o
	$(LINKXX) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@

install: all
	$(SED) -e 's/%S390_TOOLS_VERSION%/$(S390_TOOLS_RELEASE)/' \
		< ziomon > $(USRSBINDIR)/ziomon;
	chmod 755 $(USRSBINDIR)/ziomon;
	$(SED) -e \
		's/%S390_TOOLS_VERSION%/$(S390_TOOLS_RELEASE)/' \
		< ziomon_fcpconf > $(USRSBINDIR)/ziomon_fcpconf;
	chmod 755 $(USRSBINDIR)/ziomon_fcpconf;
	$(SED) -e \
		's/%S390_TOOLS_VERSION%/$(S390_TOOLS_RELEASE)/' \
		< ziorep_config > $(USRSBINDIR)/ziorep_config;
	chmod 755 $(USRSBINDIR)/ziorep_config;
	$(INSTALL) ziomon.8 $(MANDIR)/man8
	$(INSTALL) ziomon_fcpconf.8 \
		$(MANDIR)/man8
	$(INSTALL) ziomon_util $(USRSBINDIR)
	$(INSTALL) ziomon_util.8 $(MANDIR)/man8
	$(INSTALL) ziomon_mgr $(USRSBINDIR)
	$(INSTALL) ziomon_mgr.8 $(MANDIR)/man8
	$(INSTALL) ziomon_zfcpdd $(USRSBINDIR)
	$(INSTALL) ziomon_zfcpdd.8 $(MANDIR)/man8
	$(INSTALL) ziorep_config.8 $(MANDIR)/man8
	$(INSTALL) ziorep_utilization \
		$(USRSBINDIR)
	$(INSTALL) ziorep_utilization.8 \
		$(MANDIR)/man8
	$(INSTALL) ziorep_traffic $(USRSBINDIR)
	$(INSTALL) ziorep_traffic.8 \
		$(MANDIR)/man8

uninstall:
	rm $(USRSBINDIR)/ziomon
	rm $(USRSBINDIR)/ziomon_util
	rm $(USRSBINDIR)/ziomon_mgr
	rm $(USRSBINDIR)/ziomon_zfcpdd
	rm $(USRSBINDIR)/ziomon_fcpconf
	rm $(USRSBINDIR)/ziorep_config
	rm $(USRSBINDIR)/ziorep_utilization
	rm $(USRSBINDIR)/ziorep_traffic
	rm $(MANDIR)/man8/ziomon.8*
	rm $(MANDIR)/man8/ziomon_util.8*
	rm $(MANDIR)/man8/ziomon_mgr.8*
	rm $(MANDIR)/man8/ziomon_zfcpdd.8*
	rm $(MANDIR)/man8/ziomon_fcpconf.8*
	rm $(MANDIR)/man8/ziorep_config.8*
	rm $(MANDIR)/man8/ziorep_utilization.8*
	rm $(MANDIR)/man8/ziorep_traffic.8*

clean:
	-rm -f *.o $(TARGETS)