From 2e0f762cecf287471ba09081293665841698eb47 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 27 Jan 2013 19:38:15 +0100 Subject: Rename libs to lib This makes us ino comptible Signed-off-by: Florian Pritz --- Makefile | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 3ea5ba9..0c8f506 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,9 @@ # You can get arduino compatibility code from Energia # https://github.com/energia/Energia # -# symlink/copy Energia/hardware/msp430/cores/msp430 to ./libs/msp430 -# symlink/copy Energia/hardware/msp430/variants/launchpad ./libs/launchpad -# symlink/copy any other libraries you use into ./libs/ +# symlink/copy Energia/hardware/msp430/cores/msp430 to ./lib/msp430 +# symlink/copy Energia/hardware/msp430/variants/launchpad ./lib/launchpad +# symlink/copy any other libraries you use into ./lib/ # # put your own code into ./src/ @@ -12,7 +12,7 @@ CC=msp430-gcc CXX=msp430-g++ MCU=msp430g2553 MSPDEBUG_DRIVER=rf2500 -CFLAGS=-c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=$(MCU) -DF_CPU=16000000L -MMD -DARDUINO=101 -DENERGIA=9 -Ilibs/launchpad +CFLAGS=-c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=$(MCU) -DF_CPU=16000000L -MMD -DARDUINO=101 -DENERGIA=9 -Ilib/launchpad CXXFLAGS=$(CFLAGS) # create a list of objects from src/ @@ -22,17 +22,17 @@ OBJS=$(OBJS_TMP:.cpp=.o) BUILD_OBJS=$(addprefix build/,$(OBJS)) # create a list of library objects -SOURCES_LIBS=$(wildcard libs/*/*.c libs/*/*.cpp) -OBJS_LIBS_TMP=$(SOURCES_LIBS:.c=.o) -OBJS_LIBS=$(OBJS_LIBS_TMP:.cpp=.o) -BUILD_OBJS_LIBS=$(addprefix build/,$(OBJS_LIBS)) +SOURCES_lib=$(wildcard lib/*/*.c lib/*/*.cpp) +OBJS_lib_TMP=$(SOURCES_lib:.c=.o) +OBJS_lib=$(OBJS_lib_TMP:.cpp=.o) +BUILD_OBJS_lib=$(addprefix build/,$(OBJS_lib)) -CFLAGS += $(addprefix -I,$(sort $(dir $(SOURCES_LIBS)))) +CFLAGS += $(addprefix -I,$(sort $(dir $(SOURCES_lib)))) all: dirs build/main.elf dirs: - mkdir -p $(sort $(dir $(BUILD_OBJS) $(BUILD_OBJS_LIBS))) + mkdir -p $(sort $(dir $(BUILD_OBJS) $(BUILD_OBJS_lib))) build/%.o: %.cpp @echo " [CXX] $@: $<" @@ -43,12 +43,12 @@ build/%.o: %.c @$(CC) $(CFLAGS) $^ -o $@ # copy together all lib code into core.a -build/libs/core.a: $(BUILD_OBJS_LIBS) +build/lib/core.a: $(BUILD_OBJS_lib) @echo " [AR] $@: $^" @msp430-ar rcs $@ $^ # link everything together -build/main.elf: $(BUILD_OBJS) build/libs/core.a +build/main.elf: $(BUILD_OBJS) build/lib/core.a @echo " [CC] $@: $^" @$(CC) -Os -Wl,-gc-sections,-u,main -mmcu=$(MCU) -o $@ $^ -lm -- cgit v1.2.3-24-g4f1b