229N/A#
229N/A# CDDL HEADER START
229N/A#
229N/A# The contents of this file are subject to the terms of the
229N/A# Common Development and Distribution License (the "License").
229N/A# You may not use this file except in compliance with the License.
229N/A#
229N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
229N/A# or http://www.opensolaris.org/os/licensing.
229N/A# See the License for the specific language governing permissions
229N/A# and limitations under the License.
229N/A#
229N/A# When distributing Covered Code, include this CDDL HEADER in each
229N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
229N/A# If applicable, add the following below this CDDL HEADER, with the
229N/A# fields enclosed by brackets "[]" replaced with your own identifying
229N/A# information: Portions Copyright [yyyy] [name of copyright owner]
229N/A#
229N/A# CDDL HEADER END
229N/A#
229N/A# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
229N/A#
229N/A
229N/Ainclude ../../../../../make-rules/shared-macros.mk
229N/A
229N/Aincdir = /usr/include
229N/Alibdir = /usr/lib
229N/Adocdir = /usr/share/doc/libusb
229N/A
229N/ALIBNAME = libusb.so.1
229N/ASRCS = wr_libusb.c
229N/AOBJS = $(SRCS:%.c=%.o)
229N/A
229N/ATEST = testlibusb
229N/A
229N/AMAPFILES = libusb.mapfile
229N/A
229N/ACFLAGS += $(CC_PIC)
229N/ACFLAGS += -I.
229N/ACFLAGS += -D_REENTRANT -D_TS_ERRNO
229N/ALDFLAGS += $(MAPFILES:%=-M %)
229N/ALIBS += -ldl -lc
229N/A
229N/Aall: $(LIBNAME)
229N/A
229N/A$(LIBNAME): $(OBJS)
229N/A $(LD) $(LDFLAGS) -G -h $@ -o $@ $(OBJS) $(LIBS)
229N/A
229N/Ainstall: $(LIBNAME)
229N/A
229N/A$(TEST): $(TEST:%=%.o)
229N/A $(CC) -o $@ $< -lusb
229N/A
229N/Acheck: all $(TEST)
229N/A LD_LIBRARY_PATH=. ./$(TEST)
229N/A
229N/Aclean:
229N/A $(RM) $(TEST) $(LIBNAME) *.o