components/libusb/wrapper/src/Makefile
author Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
Thu, 20 Oct 2016 09:26:57 -0700
changeset 7140 dda35b00b768
parent 5682 94c0ca64c022
permissions -rw-r--r--
24925632 xsl-stylesheets missing default version symlink after the move to userland
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
229
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     1
#
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     2
# CDDL HEADER START
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     3
#
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     7
#
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    11
# and limitations under the License.
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    12
#
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    18
#
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    19
# CDDL HEADER END
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    20
#
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 1394
diff changeset
    21
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 1394
diff changeset
    22
#
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 1394
diff changeset
    23
# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
229
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    24
#
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    25
1394
5f86498eee95 16991973 some things ain't parfait'n
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 229
diff changeset
    26
LIBNAME =	libusb.so.1
5f86498eee95 16991973 some things ain't parfait'n
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 229
diff changeset
    27
5f86498eee95 16991973 some things ain't parfait'n
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 229
diff changeset
    28
all:	$(LIBNAME)
5f86498eee95 16991973 some things ain't parfait'n
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 229
diff changeset
    29
229
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    30
include ../../../../../make-rules/shared-macros.mk
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    31
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    32
SRCS =		wr_libusb.c
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    33
OBJS =		$(SRCS:%.c=%.o)
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    34
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    35
TEST =		testlibusb
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    36
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    37
MAPFILES =	libusb.mapfile
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    38
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    39
CFLAGS +=	$(CC_PIC)
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    40
CFLAGS +=	-I.
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    41
CFLAGS +=	-D_REENTRANT -D_TS_ERRNO
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    42
LDFLAGS +=	$(MAPFILES:%=-M %)
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    43
LIBS +=		-ldl -lc
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    44
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    45
$(LIBNAME):	$(OBJS)
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    46
	$(LD) $(LDFLAGS) -G -h $@ -o $@ $(OBJS) $(LIBS)
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    47
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    48
install:	$(LIBNAME)
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    49
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    50
$(TEST):	$(TEST:%=%.o)
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    51
	$(CC) -o $@ $< -lusb
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    52
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    53
check:	all $(TEST)
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    54
	LD_LIBRARY_PATH=. ./$(TEST)
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    55
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    56
clean:
1fd565334dfc 7043696 libusb should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    57
	$(RM) $(TEST) $(LIBNAME) *.o