File: Makefile

package info (click to toggle)
lio-utils 3.1%2Bgit2.fd0b34fd-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 992 kB
  • sloc: ansic: 7,031; python: 3,039; perl: 885; sh: 414; makefile: 118
file content (44 lines) | stat: -rw-r--r-- 997 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
#CWD=$(shell pwd)
#AUTOCONFIG=$(CWD)/../autoconfig --write-to-file --current-directory=$(CWD)
#include $(shell $(AUTOCONFIG))

#
# Makefile for dynamically loadable module for the Target Mib
#
TOPDIR		= /usr
MIBDIR		= $(TOPDIR)/share/snmp/mibs
DLMODDIR	= $(TOPDIR)/lib/snmp/dlmod
INCLDIR		= $(TOPDIR)/include/net-snmp

MIBS		= LIO-IPS-AUTH-MIB.txt LIO-ISCSI-MIB.txt LIO-SCSI-MIB.txt

TARG		= iscsiTargetMib.so

OBJS		= iscsiTargetMib.o iscsiMib.o scsiMib.o ipsAuthMib.o \
		iscsiAuthData.o

CC		= gcc
CFLAGS		= -I$(INCLDIR) -I$(INCLDIR)/agent -I$(INCLDIR)/agent/mibgroup -shared -fPIC
CFLAGS		+= -I../include -Wall -Werror
#CFLAGS		+=$(AUTO_CFLAGS)

LD		= gcc -shared

INSTALL		= install

all: $(TARG)

%.o: %.c *.h 
	$(CC) $(CFLAGS) -o $@ -c $<

$(TARG): $(OBJS)
	$(LD) -o $@ $(OBJS)

clean:
	rm -f $(OBJS) $(TARG)

install: all
	mkdir -p $(DESTDIR)/$(DLMODDIR)
	$(INSTALL) $(TARG) $(DESTDIR)/$(DLMODDIR)
	mkdir -p $(DESTDIR)/$(MIBDIR)
	(cd mibs ; $(INSTALL) -m 644 $(MIBS) $(DESTDIR)/$(MIBDIR))