1all: imx_usb imx_uart
2
3#$(foreach v,$(.VARIABLES), $(info $(v) = $($(v))))
4
5# Building with MinGW natively
6CC = gcc
7USBCFLAGS = -I$(LIBUSBPATH)\include
8USBLDFLAGS = -L$(LIBUSBPATH)\MinGW32\dll -lusb-1.0
9
10imx_usb.o : imx_usb.c imx_sdp.h portable.h
11	$(CC) -c $*.c -o $@ -Wstrict-prototypes -Wno-trigraphs -pipe -ggdb $(USBCFLAGS) $(CFLAGS)
12
13%.o : %.c imx_sdp.h portable.h
14	$(CC) -c $*.c -o $@ -Wstrict-prototypes -Wno-trigraphs -pipe -ggdb $(CFLAGS)
15
16imx_usb: imx_usb.o imx_sdp.o
17	$(CC) -o $@ $@.o imx_sdp.o $(LDFLAGS) $(USBLDFLAGS)
18
19imx_uart: imx_uart.o imx_sdp.o
20	$(CC) -o $@ $@.o imx_sdp.o $(LDFLAGS)
21
22clean:
23	del /f /q imx_usb imx_uart imx_usb.o imx_uart.o imx_sdp.o
24
25.PHONY: all clean install
26