aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Peplin <chris.peplin@rhubarbtech.com>2012-03-31 18:48:20 -0400
committerChristopher Peplin <chris.peplin@rhubarbtech.com>2012-03-31 18:48:20 -0400
commitde2b5273ec27fbf418c642a34af4721608cd4163 (patch)
treeeaeaf07f77bab46d84cae8d42256f4578d0e6f63
parent8f10b98e51a973f80fe6850eb36f340717bb11f7 (diff)
Separate out user lib variables from sys lib counterparts for clarity.
-rw-r--r--arduino-mk/Arduino.mk20
1 files changed, 10 insertions, 10 deletions
diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk
index 54d2f89..f93ead3 100644
--- a/arduino-mk/Arduino.mk
+++ b/arduino-mk/Arduino.mk
@@ -331,20 +331,20 @@ ECHO = echo
# General arguments
SYS_LIBS = $(patsubst %,$(ARDUINO_LIB_PATH)/%,$(ARDUINO_LIBS))
USER_LIBS = $(patsubst %,$(USER_LIB_PATH)/%,$(ARDUINO_LIBS))
-SYS_INCLUDES = $(patsubst %,-I%,$(SYS_LIBS)) $(patsubst %,-I%,$(USER_LIBS))
+SYS_INCLUDES = $(patsubst %,-I%,$(SYS_LIBS))
+USER_INCLUDES = $(patsubst %,-I%,$(USER_LIBS))
LIB_C_SRCS = $(wildcard $(patsubst %,%/*.c,$(SYS_LIBS)))
LIB_CPP_SRCS = $(wildcard $(patsubst %,%/*.cpp,$(SYS_LIBS)))
-USER_LIB_CPP_SRC = $(wildcard $(patsubst %,%/*.cpp,$(USER_LIBS)))
-USER_LIB_C_SRC = $(wildcard $(patsubst %,%/*.c,$(USER_LIBS)))
+USER_LIB_CPP_SRCS = $(wildcard $(patsubst %,%/*.cpp,$(USER_LIBS)))
+USER_LIB_C_SRCS = $(wildcard $(patsubst %,%/*.c,$(USER_LIBS)))
LIB_OBJS = $(patsubst $(ARDUINO_LIB_PATH)/%.c,$(OBJDIR)/libs/%.o,$(LIB_C_SRCS)) \
- $(patsubst $(ARDUINO_LIB_PATH)/%.cpp,$(OBJDIR)/libs/%.o,$(LIB_CPP_SRCS)) \
- $(patsubst $(USER_LIB_PATH)/%.cpp,$(OBJDIR)/libs/%.o,$(USER_LIB_CPP_SRCS)) \
+ $(patsubst $(ARDUINO_LIB_PATH)/%.cpp,$(OBJDIR)/libs/%.o,$(LIB_CPP_SRCS))
+USER_LIB_OBJS = $(patsubst $(USER_LIB_PATH)/%.cpp,$(OBJDIR)/libs/%.o,$(USER_LIB_CPP_SRCS)) \
$(patsubst $(USER_LIB_PATH)/%.c,$(OBJDIR)/libs/%.o,$(USER_LIB_C_SRCS))
-
CPPFLAGS = -mmcu=$(MCU) -DF_CPU=$(F_CPU) -DARDUINO=$(ARDUINO_VERSION) \
-I. -I$(ARDUINO_CORE_PATH) -I$(ARDUINO_VAR_PATH)/$(VARIANT) \
- $(SYS_INCLUDES) -g -Os -w -Wall \
+ $(SYS_INCLUDES) $(USER_INCLUDES) -g -Os -w -Wall \
-ffunction-sections -fdata-sections
CFLAGS = -std=gnu99
CXXFLAGS = -fno-exceptions
@@ -484,8 +484,8 @@ $(OBJDIR):
$(TARGET_ELF): $(LOCAL_OBJS) $(CORE_LIB) $(OTHER_OBJS)
$(CC) $(LDFLAGS) -o $@ $(LOCAL_OBJS) $(CORE_LIB) $(OTHER_OBJS) -lc -lm
-$(CORE_LIB): $(CORE_OBJS) $(LIB_OBJS)
- $(AR) rcs $@ $(CORE_OBJS) $(LIB_OBJS)
+$(CORE_LIB): $(CORE_OBJS) $(LIB_OBJS) $(USER_LIB_OBJS)
+ $(AR) rcs $@ $(CORE_OBJS) $(LIB_OBJS) $(USER_LIB_OBJS)
$(DEP_FILE): $(OBJDIR) $(DEPS)
cat $(DEPS) > $(DEP_FILE)
@@ -519,7 +519,7 @@ ispload: $(TARGET_HEX)
-U lock:w:$(ISP_LOCK_FUSE_POST):m
clean:
- $(REMOVE) $(LOCAL_OBJS) $(CORE_OBJS) $(LIB_OBJS) $(CORE_LIB) $(TARGETS) $(DEP_FILE) $(DEPS)
+ $(REMOVE) $(LOCAL_OBJS) $(CORE_OBJS) $(LIB_OBJS) $(CORE_LIB) $(TARGETS) $(DEP_FILE) $(DEPS) $(USER_LIB_OBJS)
depends: $(DEPS)
cat $(DEPS) > $(DEP_FILE)