105890ca0SHans Petter Selasky# 205890ca0SHans Petter Selasky# 305890ca0SHans Petter Selasky# Copyright (c) 2013 Hans Petter Selasky. All rights reserved. 405890ca0SHans Petter Selasky# 505890ca0SHans Petter Selasky# Redistribution and use in source and binary forms, with or without 605890ca0SHans Petter Selasky# modification, are permitted provided that the following conditions 705890ca0SHans Petter Selasky# are met: 805890ca0SHans Petter Selasky# 1. Redistributions of source code must retain the above copyright 905890ca0SHans Petter Selasky# notice, this list of conditions and the following disclaimer. 1005890ca0SHans Petter Selasky# 2. Redistributions in binary form must reproduce the above copyright 1105890ca0SHans Petter Selasky# notice, this list of conditions and the following disclaimer in the 1205890ca0SHans Petter Selasky# documentation and/or other materials provided with the distribution. 1305890ca0SHans Petter Selasky# 1405890ca0SHans Petter Selasky# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1505890ca0SHans Petter Selasky# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1605890ca0SHans Petter Selasky# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1705890ca0SHans Petter Selasky# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 1805890ca0SHans Petter Selasky# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1905890ca0SHans Petter Selasky# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2005890ca0SHans Petter Selasky# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2105890ca0SHans Petter Selasky# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2205890ca0SHans Petter Selasky# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2305890ca0SHans Petter Selasky# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2405890ca0SHans Petter Selasky# SUCH DAMAGE. 2505890ca0SHans Petter Selasky# 2605890ca0SHans Petter Selasky 2705890ca0SHans Petter Selasky# 2805890ca0SHans Petter Selasky# USB test application 2905890ca0SHans Petter Selasky# 3005890ca0SHans Petter Selasky 3105890ca0SHans Petter Selasky.PATH: ${.CURDIR} 3205890ca0SHans Petter Selasky.SUFFIXES: .a 3305890ca0SHans Petter Selasky 3405890ca0SHans Petter SelaskyPROG= usbloader 3505890ca0SHans Petter SelaskySRCS= 3605890ca0SHans Petter Selasky 3705890ca0SHans Petter SelaskyCFLAGS+= -Wall 38*f6f5aa8aSJohn BaldwinCFLAGS+= -Wno-error=missing-prototypes -Wno-error=unused-parameter 3905890ca0SHans Petter SelaskyCFLAGS+= -g 4005890ca0SHans Petter Selasky 4105890ca0SHans Petter Selasky.if ${MACHINE_CPUARCH} == "amd64" 4205890ca0SHans Petter SelaskyCFLAGS+= -m32 4305890ca0SHans Petter Selasky.endif 4405890ca0SHans Petter Selasky 4505890ca0SHans Petter SelaskyLDFLAGS+= -Wl,--gc-sections 4605890ca0SHans Petter Selasky 4705890ca0SHans Petter SelaskySRCS+= bsd_usbloader_test.c 4805890ca0SHans Petter Selasky 4905890ca0SHans Petter SelaskyUSBLIB?= ${.OBJDIR}/../libusbboot.a 5005890ca0SHans Petter Selasky 5105890ca0SHans Petter SelaskyLDADD+= ${USBLIB} 5205890ca0SHans Petter SelaskyDPADD+= ${USBLIB} 5305890ca0SHans Petter Selasky 5405890ca0SHans Petter SelaskyMAN= 5505890ca0SHans Petter Selasky 5605890ca0SHans Petter Selasky.include <bsd.prog.mk> 5705890ca0SHans Petter Selasky 5805890ca0SHans Petter Selasky${USBLIB}: 5905890ca0SHans Petter Selasky make -C ${.CURDIR}/.. USBCOREDIR=${.CURDIR}/.. 6005890ca0SHans Petter Selasky 61