Skip to content
Permalink
d013388a7b
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
58 lines (46 sloc) 1.17 KB
#
# OSD initiator library
#
SRC := device.c sync.c drivelist.c command.c sense.c
INC := device.h sync.h drivelist.h command.h sense.h
OBJ := $(SRC:.c=.o)
LIB := libosdinit.a
-include ../Makedefs
CC := gcc
CPP_M := -MM
LD := $(CC)
COPTS := $(OPT) -fPIC
CWARN := -Wall -W -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual \
-Wbad-function-cast -Wundef -Wmissing-prototypes -Wstrict-prototypes \
-Wmissing-declarations -Wnested-externs
CFLAGS := $(COPTS) $(CWARN) -I..
#CFLAGS += -Dsg_io_v4=sg_io_v4_v2622
CFLAGS += -Dsg_io_v4=sg_io_v4_v2624
all:: $(LIB) $(OBJ)
$(LIB): $(OBJ)
ar cr $@ $^
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
ifeq (,$(filter clean distclean dist,$(MAKECMDGOALS)))
-include .depend
endif
all:: .depend
.depend: $(SRC) $(INC) Makefile
@$(CC) $(CPP_M) $(CFLAGS) $(SRC) > .depend
clean:
rm -f $(LIB) $(OBJ)
rm -f .depend
tags: FORCE
ctags $(SRC) $(INC)
FORCE:;
# distribution tarball
.PHONY: dist
MV := osd-initiator
MVD := $(MV)-$(shell date +%Y%m%d)
dist:
rm -rf $(MV) $(MVD)
mkdir $(MVD)
svn list -R | grep -v '/$$' | rsync --files-from=/dev/stdin ./ $(MVD)/
ln -s $(MVD) $(MV)
tar cf - $(MV) $(MVD) | bzip2 -9c > $(MVD).tar.bz2
rm -rf $(MV) $(MVD)