File: Makefile.in

package info (click to toggle)
xmbmon 2.05-8
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 928 kB
  • ctags: 910
  • sloc: ansic: 6,089; sh: 2,151; perl: 87; makefile: 79
file content (145 lines) | stat: -rw-r--r-- 4,241 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
#
# Makefile for xmbmon related things
#  (for FreeBSD)
#

srcdir = @srcdir@
VPATH  = @srcdir@

# for Linux
DEFS=-DHAVE_CONFIG_H -Wall -DLINUX
# for using SMBus ioctl
#DEFS=-DHAVE_CONFIG_H -Wall -DSMBUS_IOCTL
# for using temperature limit (see getMBinfo.c)
#DEFS=-DHAVE_CONFIG_H -Wall -DTEMP_LIMIT

# for using logging facility
#DEFS=-DHAVE_CONFIG_H -Wall -DLOGGING

# for making small_mbmon
#DEFS=-DHAVE_CONFIG_H -Wall -DSMALL_MBMON

#DEFS=-DHAVE_CONFIG_H -Wall @HOSTDEF@

INCLUDES=-I$(srcdir)
LIBS=@ADDLIBS@ @LIBS@
LIBSX=$(LIBS) @X_LIBS@ -lXt @X_PRE_LIBS@ -lX11 @X_EXTRA_LIBS@

#CC=/compat/linux/usr/bin/gcc
CC=@CC@
CFLAGS=-O3 $(INCLUDES) $(DEFS)
CFLAGSX=$(CFLAGS) @X_CFLAGS@
#LDFLAGS=-s

LINT=lint
# LINT=$(CC) -c -Wall -Wshadow -Wpointer-arith
# also maybe -Wcast-qual -Wwrite-strings
RM=rm -f
INSTALL=install -D

# Modified for Debian
INST_DIR=$(DESTDIR)/usr/bin
INST_MANDIR=$(DESTDIR)/usr/share/man/man1
INST_XDIR=$(DESTDIR)/usr/bin
INST_MANXDIR=$(DESTDIR)/usr/share/man/man1
INST_XRDIR=$(DESTDIR)/etc/X11/app-defaults
 
.c.o:
	$(CC) -c $(CFLAGS) $*.c

MANPAGE = mbmon.1 xmbmon.1x
PROGRAM = mbmon xmbmon

TESTPROG = testpci testsmb testhwm testfan

MB_OBJ  = getMB-via.o getMB-smb.o getMB-isa.o
SMB_OBJ = smbuses.o smbus_piix4.o smbus_amd.o smbus_ali.o smbus_amd8.o
HWM_OBJ = sens_winbond.o sens_via686.o sens_it87.o sens_gl52.o sens_lm85.o sens_lm80.o sens_lm90.o sens_lm75.o sens_wl784.o smb_extemp.o
OBJS = getMBinfo.o tyan_tiger.o pci_pm.o sensors.o $(MB_OBJ) $(SMB_OBJ) $(HWM_OBJ)

all: $(PROGRAM)

mbmon: mbmon.c mbmon.h methods.h pci_pm.h smbuses.h sensors.h $(OBJS)
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ mbmon.c $(OBJS) $(LIBS)

mbmon_small: mbmon_small.c mbmon.h methods.h pci_pm.h smbuses.h sensors.h $(OBJS)
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ mbmon_small.c $(OBJS) $(LIBS)

xmbmon: xmbmon.c mbmon.h methods.h pci_pm.h smbuses.h sensors.h $(OBJS)
	$(CC) $(CFLAGSX) $(LDFLAGS) -o $@ xmbmon.c $(OBJS) $(LIBSX)

testprog: $(TESTPROG)

testpci: testpci.c pci_smb.c pci_pm.o pci_pm.h
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ testpci.c pci_pm.o $(SMB_OBJ) $(LIBS)

testsmb: testsmb.c pci_smb.c pci_pm.o pci_pm.h smbus_piix4.c smbus_amd.c smbus_ali.c smbus_amd8.c
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ testsmb.c pci_pm.o $(SMB_OBJ) $(LIBS)

testhwm: testhwm.c pci_smb.c pci_pm.o pci_pm.h smbus_piix4.c smbus_amd.c smbus_ali.c smbus_amd8.c
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ testhwm.c pci_pm.o $(SMB_OBJ) $(LIBS)

testfan: testhwm.c pci_smb.c pci_pm.o pci_pm.h smbus_piix4.c smbus_amd.c smbus_ali.c smbus_amd8.c
	$(CC) -DFAN_DIV_CHK $(CFLAGS) $(LDFLAGS) -o $@ testhwm.c pci_pm.o $(SMB_OBJ) $(LIBS)


getMB-isa.o: getMB-isa.c methods.h io_static.c io_cpu.h

getMB-smb.o: getMB-smb.c getMB-smb_ioctl.c methods.h smbuses.h io_static.c io_cpu.h

getMB-via.o: getMB-via.c methods.h io_static.c io_cpu.h

getMBinfo.o: getMBinfo.c methods.h pci_pm.h smbuses.h sensors.h sensors.c

pci_pm.o: pci_pm.c pci_pm.h io_static.c io_cpu.h

smbuses.o: smbuses.c smbuses.h

smbus_piix4.o: smbus_piix4.c smbuses.h io_cpu.h

smbus_amd.o: smbus_amd.c smbuses.h io_cpu.h

smbus_ali.o: smbus_ali.c smbuses.h io_cpu.h

smbus_amd8.o: smbus_amd8.c smbuses.h io_cpu.h

sensors.o: sensors.c sensors.h

sens_it87.o: sens_it87.c sensors.h sensors.c

sens_gl52.o: sens_gl52.c sensors.h sensors.c

sens_lm85.o: sens_lm85.c sensors.h sensors.c

sens_lm80.o: sens_lm80.c sensors.h sensors.c

sens_via686.o: sens_via686.c sensors.h sensors.c

sens_winbond.o: sens_winbond.c sens_winbond.h sensors.h sensors.c

sens_lm90.o: sens_lm90.c sensors.h sensors.c

sens_lm75.o: sens_lm75.c sensors.h sensors.c

sens_wl784.o: sens_wl784.c sens_wl784.h sensors.h sensors.c

tyan_tiger.o: tyan_tiger.c io_static.c io_cpu.h

smb_extemp.o: smb_extemp.c smb_extemp.h

clean:
	$(RM) *.o *.bak a.out core *.core *~ $(PROGRAM) $(TESTPROG) mbmon_small

distclean: clean
	$(RM) Makefile config.cache config.log config.h config.status

install: $(PROGRAM)
	$(INSTALL) -o root -g adm -m 4555 -c -p mbmon $(INST_DIR)/mbmon
	$(INSTALL) -o root -g adm -m 4555 -c -p xmbmon $(INST_XDIR)/xmbmon

install-man: $(MANPAGE)
	$(INSTALL) -o root -g adm -m 444 -c -p mbmon.1 $(INST_MANDIR)
	$(INSTALL) -o root -g adm -m 444 -c -p xmbmon.1x $(INST_MANXDIR)

lint:
	$(LINT) $(INCLUDES) $(DEFS) $(FONTDEFINES) $(SRCS) -lm