Files
scst/iscsi-scst/usr/Makefile
Vladislav Bolkhovitin 20a2e4ae8d Copyrights updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@408 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-06-12 11:39:28 +00:00

56 lines
1.4 KiB
Makefile

#
# Makefile for the user space part of iSCSI-SCST.
#
# Copyright (C) 2007 - 2008 Vladislav Bolkhovitin
# Copyright (C) 2007 - 2008 CMS Distribution Limited
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, version 2
# of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
SRCS_D = iscsid.c iscsi_scstd.c conn.c session.c target.c message.c ctldev.c \
log.c chap.c event.c param.c plain.c isns.c
OBJS_D = $(SRCS_D:.c=.o)
SRCS_ADM = iscsi_adm.c param.c
OBJS_ADM = $(SRCS_ADM:.c=.o)
CFLAGS += -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include
PROGRAMS = iscsi-scstd
# iscsi-scst-adm
LIBS = -lcrypto
all: $(PROGRAMS)
iscsi-scstd: .depend_d $(OBJS_D)
$(CC) $(OBJS_D) $(LIBS) $(LOCAL_LD_FLAGS) -o $@
iscsi-scst-adm: .depend_adm $(OBJS_ADM)
$(CC) $(OBJS_ADM) $(LIBS) $(LOCAL_LD_FLAGS) -o $@
ifeq (.depend_d,$(wildcard .depend_d))
-include .depend_d
endif
ifeq (.depend_adm,$(wildcard .depend_adm))
-include .depend_adm
endif
%.o: %.c Makefile
$(CC) -c -o $(@) $(CFLAGS) $(<)
.depend_d:
$(CC) -M $(CFLAGS) $(SRCS_D) >$(@)
.depend_adm:
$(CC) -M $(CFLAGS) $(SRCS_ADM) >$(@)
clean:
rm -f *.o $(PROGRAMS) .depend*