forked from sergev/pic32prog
-
Notifications
You must be signed in to change notification settings - Fork 1
/
make-cygwin
50 lines (42 loc) · 1.98 KB
/
make-cygwin
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
CC = gcc
GITCOUNT = $(shell git rev-list HEAD --count)
CFLAGS = -Wall -g -O -Ihidapi/hidapi -DGITCOUNT='"$(GITCOUNT)"'
LDFLAGS = -s
# Windows
LIBS += -Lhidapi/windows/.libs -lhid -lsetupapi
PROG_OBJS = pic32prog.o target.o executive.o serial.o \
adapter-pickit2.o adapter-hidboot.o adapter-an1388.o\
adapter-bitbang.o adapter-stk500v2.o adapter-uhb.o \
adapter-an1388-uart.o configure.o \
family-mx1.o family-mx3.o family-mz.o family-mm.o family-mk.o \
hidapi/windows/.libs/libhidapi.a
# JTAG adapters based on FT2232 chip
CFLAGS += -Ilibusb-win32 -DUSE_MPSSE
PROG_OBJS += adapter-mpsse.o
LIBS += -Llibusb-win32 -lusb-1.0
all: pic32prog.exe
pic32prog.exe: $(PROG_OBJS)
$(CC) $(LDFLAGS) -o $@ $(PROG_OBJS) $(LIBS)
hid.o: $(HIDSRC)
$(CC) $(CFLAGS) -c -o $@ $<
hidapi/windows/.libs/libhidapi.a:
cd hidapi && ./bootstrap && ./configure && make
###
adapter-an1388.o: adapter-an1388.c adapter.h hidapi/hidapi/hidapi.h pic32.h
adapter-an1388-uart.o: adapter-an1388-uart.c adapter.h pic32.h serial.h
adapter-bitbang.o: adapter-bitbang.c adapter.h pic32.h serial.h bitbang/ICSP_v1E.inc
adapter-hidboot.o: adapter-hidboot.c adapter.h hidapi/hidapi/hidapi.h pic32.h
adapter-mpsse.o: adapter-mpsse.c libusb-win32/libusb-1.0/libusb.h adapter.h pic32.h
adapter-pickit2.o: adapter-pickit2.c adapter.h hidapi/hidapi/hidapi.h pickit2.h pic32.h
adapter-stk500v2.o: adapter-stk500v2.c adapter.h pic32.h serial.h
adapter-uhb.o: adapter-uhb.c adapter.h hidapi/hidapi/hidapi.h pic32.h
configure.o: configure.c target.h adapter.h
executive.o: executive.c pic32.h
family-mx1.o: family-mx1.c pic32.h
family-mx3.o: family-mx3.c pic32.h
family-mz.o: family-mz.c pic32.h
family-mm.o: family-mm.c pic32.h
family-mk.o: family-mk.c pic32.h
pic32prog.o: pic32prog.c target.h adapter.h serial.h localize.h
serial.o: serial.c adapter.h
target.o: target.c target.h adapter.h localize.h pic32.h