-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmake-mingw
47 lines (31 loc) · 1.13 KB
/
make-mingw
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
#CC = gcc
CC = i586-mingw32msvc-gcc
GITCOUNT = $(shell git rev-list HEAD --count)
CFLAGS = -Wall -g -O -DMINGW32 -Ilibusb-win32 -Ihidapi -DGITCOUNT='"$(GITCOUNT)"'
LDFLAGS = -s
# Windows
LIBS += -lhid -lsetupapi -lwsock32
HIDSRC = hidapi/hid-windows.c
OBJS = gdbproxy.o rpmisc.o target-ejtag.o hid.o \
proxy-mips.o adapter-pickit2.o
# Olimex ARM-USB-Tiny JTAG adapter.
CFLAGS += -DUSE_MPSSE
OBJS += adapter-mpsse.o
LIBS += -Llibusb-win32/x86 -lusb0_x86
all: clean ejtagproxy.exe
clean:
rm -f *.o
ejtagproxy.exe: $(OBJS)
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
hid.o: $(HIDSRC)
$(CC) $(CFLAGS) -c -o $@ $<
###
adapter-mpsse.o: adapter-mpsse.c adapter.h mips.h ejtag.h
adapter-pickit2.o: adapter-pickit2.c adapter.h hidapi/hidapi.h pickit2.h \
mips.h ejtag.h
gdbproxy.o: gdbproxy.c gdbproxy.h
proxy-mips.o: proxy-mips.c gdbproxy.h target.h mips.h
proxy-skeleton.o: proxy-skeleton.c gdbproxy.h
rpmisc.o: rpmisc.c gdbproxy.h
target-ejtag.o: target-ejtag.c target.h adapter.h mips.h ejtag.h
hid.o: hidapi/hid-windows.c hidapi/hidapi.h