summaryrefslogtreecommitdiff
path: root/util/Makefile.sample
blob: 2976dd575a0fa0fc7c842531ebb2dc46d2ff3b16 (plain)
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
# Makefile for ipmi_sample program
#
TARGETS = ipmi_sample  ipmi_sample_evt 
incl_dir = /usr/include
CFLAGS_SAM = -O2 -g -I. -DLINUX 
LDFLAGS = -lpthread 
# if building without lanplus, comment out these two lines
CFLAGS_SAM += -DHAVE_LANPLUS
LDFLAGS += -lcrypto

# see /usr/lib/libipmiutil.a
LDFLAGS += -lipmiutil

all:	$(TARGETS)

ipmi_sample:	ipmi_sample.c $(incl_dir)/ipmicmd.h
	$(CC) $(CFLAGS_SAM) -c ipmi_sample.c
	$(CC)  -g -O2 -o ipmi_sample ipmi_sample.o $(LDFLAGS)

ipmi_sample_evt:	ipmi_sample_evt.c isensor.c ievents.c 
	$(CC) $(CFLAGS_SAM) -c ipmi_sample_evt.c
	$(CC) $(CFLAGS_SAM) -o isensor2.o -c isensor.c 
	$(CC) $(CFLAGS_SAM) -DSENSORS_OK -o ievents2.o -c ievents.c 
	$(CC) -g -O2 -o ipmi_sample_evt ipmi_sample_evt.o isensor2.o ievents2.o   $(LDFLAGS) 

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