-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
81 lines (73 loc) · 2.36 KB
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#******************************************************************************
#
# makefile - Rules for building the utility library.
#
# Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
# ALL RIGHTS RESERVED
#
#******************************************************************************
#
# Locating the root directory
#
ROOT=.
#
# Device definition (required for interrupt API prototypes)
#
DEVICE=am1808
#
# Include makefile definitions. Includes compilation, linker and archiving
# options.
#
include ${ROOT}/build/armv5/gcc/makedefs
#
# Source files for given target
#
SOURCE=${USBLIB_SRC}/usbbuffer.c \
${USBLIB_SRC}/usbdesc.c \
${USBLIB_SRC}/usbringbuf.c \
${USBLIB_SRC}/usbtick.c \
${USBLIB_SRC}/usbkeyboardmap.c \
${USBLIB_SRC}/device/usbdcdc.c \
${USBLIB_SRC}/device/usbdhid.c \
${USBLIB_SRC}/device/usbdhidmouse.c \
${USBLIB_SRC}/device/usbdmsc.c \
${USBLIB_SRC}/device/usbdbulk.c \
${USBLIB_SRC}/device/usbdcdesc.c \
${USBLIB_SRC}/device/usbdcomp.c \
${USBLIB_SRC}/device/usbdconfig.c \
${USBLIB_SRC}/device/usbdenum.c \
${USBLIB_SRC}/device/usbdhandler.c \
${USBLIB_SRC}/host/usbhostenum.c \
${USBLIB_SRC}/host/usbhhid.c \
${USBLIB_SRC}/host/usbhmsc.c \
${USBLIB_SRC}/host/usbhscsi.c \
${USBLIB_SRC}/host/usbhhidmouse.c \
${USBLIB_SRC}/host/usbhhidkeyboard.c
#
# Uncomment this line to disable high speed USB (i.e. use full speed instead)
#
#CFLAGS+= -DUSB_MODE_HS_DISABLE
#CFLAGS += -DDEBUG_USBLIB
#
# Rules for building the source files
#
all: debug release
debug:
mkdir -p Debug
$(CC) $(CFLAGS) -g -D DMA_MODE $(SOURCE)
$(AR) $(ARFLAGS) Debug/libusblib.a *.o*
@mv *.o* Debug/
@mkdir -p ${USBLIB_BIN}/Debug
@cp Debug/libusblib.a ${USBLIB_BIN}/Debug/libusblib.a
release:
mkdir -p Release
$(CC) $(CFLAGS) -g -O2 -D DMA_MODE $(SOURCE)
$(AR) $(ARFLAGS) Release/libusblib.a *.o*
@mv *.o* Release/
@mkdir -p ${USBLIB_BIN}/Release
@cp Release/libusblib.a ${USBLIB_BIN}/Release/libusblib.a
#
# Rules for cleaning
#
clean:
@rm -rf Debug Release ${USBLIB_BIN}/Debug ${USBLIB_BIN}/Release