| # Copyright 2010 by Nest Labs, Inc. All rights reserved. | |
| # | |
| # This program is confidential and proprietary to Nest Labs, Inc., | |
| # and may not be reproduced, published or disclosed to others without | |
| # company authorization. | |
| # | |
| # the setup below is for gcc on a unix-like platform. | |
| # uncomment one of these for the target machine platform | |
| ifndef BUILD_PLATFORM | |
| #BUILD_PLATFORM = nspr | |
| BUILD_PLATFORM = freertos | |
| endif | |
| OBJ_DIR = $(DEPTH)objs | |
| LIB_DIR = $(DEPTH)libs | |
| ifeq ($(BUILD_PLATFORM),nspr) | |
| BIN_DIR = $(DEPTH)mozilla/nsprpub/dist/bin | |
| else | |
| BIN_DIR = $(DEPTH)bin | |
| endif | |
| OS_ARCH = $(shell uname -s | sed -e 's|/|_|g') | |
| Verbose = @ | |
| COMPILE = $(Verbose)echo $@; $(CC) | |
| OPT_INCLUDE += | |
| OPT_LIB += | |
| LINK = $(Verbose)echo $@; $(CC) | |
| ARCHIVE = $(Verbose)echo $@; ar -r | |
| RANLIB = ranlib | |
| MAKE = make -s | |
| RM = rm -rf | |
| MKDIR = mkdir -p | |
| CP = cp | |
| WFLAGS = \ | |
| -Wall \ | |
| -Wextra \ | |
| -Wunused \ | |
| -Wimplicit \ | |
| -Wreturn-type \ | |
| -Wparentheses \ | |
| -Wformat \ | |
| -Wchar-subscripts \ | |
| -Wsequence-point | |
| CFLAGS = $(WFLAGS) \ | |
| -c \ | |
| -g \ | |
| ifeq ($(BUILD_PLATFORM),nspr) | |
| CFLAGS += -I $(DEPTH)mozilla/nsprpub/dist/include | |
| CFLAGS += -I $(DEPTH)mozilla/nsprpub/pr/include | |
| CFLAGS += -I $(DEPTH)mozilla/nsprpub/dist/include/nspr | |
| CFLAGS += -I $(DEPTH)mozilla/nsprpub/pr/include/private | |
| CFLAGS += -I $(DEPTH)nler/nspr | |
| else | |
| CFLAGS += -I $(DEPTH)linux-freertos/ftos | |
| CFLAGS += -I $(DEPTH)nler/freertos | |
| endif | |
| LIBS = -L$(LIB_DIR) \ | |
| -L$(OPT_LIB) \ | |
| -lnlershared | |
| ifeq ($(BUILD_PLATFORM),nspr) | |
| LIBS += -L$(DEPTH)mozilla/nsprpub/dist/lib | |
| LIBS += -lnspr4 | |
| LIBS += -lplc4 | |
| LIBS += -lplds4 | |
| LIBS += -lnlernspr | |
| else | |
| LIBS += -lnlerfreertos | |
| LIBS += -lfreertos | |
| LIBS += -lpthread | |
| endif | |