-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
53 lines (37 loc) · 1.19 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
include path.mk
VPATH = src
INCLUDES = -Iinclude \
-I$(CC3200SDKPATH)/simplelink/ \
-I$(CC3200SDKPATH)/simplelink/include \
-I$(CC3200SDKPATH)/simplelink_extlib/provisioninglib
ARCHFLAGS = -g -MD -MP -march=armv7-m -mthumb -mfloat-abi=soft
COREFLAGS = $(ARCHFLAGS) -Wall -Werror -Wno-unknown-pragmas \
-fdata-sections -ffunction-sections \
-fno-builtin -fno-stack-protector -mfix-cortex-m3-ldrd \
-D_REENT_SMALL
ASFLAGS = -c $(ARCHFLAGS)
CFLAGS = -c $(COREFLAGS) -std=gnu99 $(INCLUDES)
CXXFLAGS = -c $(COREFLAGS) -std=gnu++0x -D_ISOC99_SOURCE \
-D__STDC_FORMAT_MACROS -fno-exceptions -fno-rtti $(INCLUDES)
AROPTS = D
LIBNAME = cc32xx-bsd-wrapper.lib
FULLPATHCSRCS = $(wildcard $(VPATH)/*.c)
CSRCS = $(notdir $(FULLPATHCSRCS))
OBJS = $(CSRCS:.c=.o)
.PHONY: all
all: $(LIBNAME)
$(LIBNAME): $(OBJS)
$(AR) crs$(AROPTS) $(LIBNAME) $(OBJS)
-include $(OBJS:.o=.d)
.SUFFIXES:
.SUFFIXES: .o .c .cxx .cpp .S
.cpp.o:
$(CXX) $(CXXFLAGS) -MD -MF $*.d $< -o $@
.cxx.o:
$(CXX) $(CXXFLAGS) -MD -MF $*.d $< -o $@
.S.o:
$(AS) $(ASFLAGS) -MD -MF $*.d $< -o $@
.c.o:
$(CC) $(CFLAGS) -MD -MF $*.d $< -o $@
clean:
rm *.o *.d *.lib