-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
40 lines (33 loc) · 798 Bytes
/
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
CFILES := cc3200reset.c
ifneq ($(OS),Windows_NT)
OS := $(shell uname -s)
endif
#CFLAGS = -fno-stack-protector -Os -o cc3200reset
CFLAGS = -Os -o cc3200reset -mmacosx-version-min=10.5
GCC = gcc
ifeq ($(OS),Darwin)
LDFLAGS = -lobjc -framework CoreFoundation -framework IOKit
CFLAGS += -Imacos/inc
LIBS = macos/libs/libftdi1.a macos/libs/libusb-1.0.a
endif
ifeq ($(OS),Linux)
LDFLAGS = -lpthread
LBITS := $(shell getconf LONG_BIT)
ifeq ($(LBITS),64)
LIBS = linux/libs64/libftdi.a linux/libs64/libusb.a
else
LIBS = linux/libs/libftdi.a linux/libs/libusb.a
endif
endif
ifeq ($(OS),Windows_NT)
LDFLAGS =
CFLAGS += -Iwin/inc
LIBS = win/libs/libftd2xx.a -lpthread
endif
all:
$(GCC) $(CFILES) $(LIBS) $(CFLAGS) $(LDFLAGS)
clean:
rm -f cc3200reset *.o
ifeq ($(OS),Darwin)
rm -rf serial.dSYM
endif