forked from sergev/pic32prog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake-mingw
33 lines (27 loc) · 1.16 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
#CC = gcc
CC = i586-mingw32msvc-gcc
SVNVERS = $(shell git rev-parse --short HEAD)
CFLAGS = -Wall -g -O -DMINGW32 -Ilibusb-win32 -Ihidapi -DSVNVERSION='"$(SVNVERS)"'
LDFLAGS = -s
# Windows
LIBS += -lhid -lsetupapi
HIDSRC = hidapi/hid-windows.c
PROG_OBJS = pic32prog.o target.o executive.o hid.o serial.o \
adapter-pickit2.o adapter-hidboot.o adapter-an1388.o\
adapter-bitbang.o adapter-stk500v2.o adapter-uhb.o \
family-mx1.o family-mx3.o family-mz.o
#PROG_OBJS += adapter-mpsse.o
#LIBS += -Llibusb-win32/x86 -lusb0_x86
all: pic32prog.exe
pic32prog.exe: $(PROG_OBJS)
$(CC) $(LDFLAGS) -o $@ $(PROG_OBJS) $(LIBS)
hid.o: $(HIDSRC)
$(CC) $(CFLAGS) -c -o $@ $<
###
adapter-an1388.o: adapter-an1388.c adapter.h hidapi/hidapi.h pic32.h
adapter-hidboot.o: adapter-hidboot.c adapter.h hidapi/hidapi.h pic32.h
adapter-mpsse.o: adapter-mpsse.c adapter.h
adapter-pickit2.o: adapter-pickit2.c adapter.h pickit2.h pic32.h
executive.o: executive.c pic32.h
pic32prog.o: pic32prog.c target.h localize.h
target.o: target.c target.h adapter.h localize.h pic32.h