| OLD | NEW |
| 1 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | 1 # Copyright (c) 2012 The Native Client Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 ifeq (,$(findstring $(TOOLCHAIN),glibc bionic)) | 5 ifeq (,$(findstring $(TOOLCHAIN),glibc bionic)) |
| 6 LIBC = newlib | 6 LIBC = newlib |
| 7 endif | 7 endif |
| 8 | 8 |
| 9 CFLAGS += -Wno-implicit-function-declaration | 9 CFLAGS += -Wno-implicit-function-declaration |
| 10 CPPFLAGS += -Werror -Wno-unused-value -pthread | 10 CPPFLAGS += -Werror -Wno-unused-value -pthread |
| 11 CPPFLAGS += -DNACL_SDK_VERSION=$(NACL_SDK_VERSION) | 11 CPPFLAGS += -DNACL_SDK_VERSION=$(NACL_SDK_VERSION) |
| 12 # Adding -g here to work around PNaCl toolchain issue | |
| 13 # TODO(sbc): remove this once we fix: | |
| 14 # https://code.google.com/p/nativeclient/issues/detail?id=4200 | |
| 15 CPPFLAGS += -g | |
| 16 OUT := out | 12 OUT := out |
| 17 SOURCES := \ | 13 SOURCES := \ |
| 18 src/alarm.c \ | 14 src/alarm.c \ |
| 15 src/dirfd.c \ |
| 19 src/err.c \ | 16 src/err.c \ |
| 17 src/file.c \ |
| 18 src/flock.c \ |
| 19 src/fts.c \ |
| 20 src/getprotobyname_r.c \ | 20 src/getprotobyname_r.c \ |
| 21 src/getservbyname_r.c \ | 21 src/getservbyname_r.c \ |
| 22 src/herrno.c \ | 22 src/herrno.c \ |
| 23 src/herror.c \ | 23 src/herror.c \ |
| 24 src/in6_addr.c \ | 24 src/in6_addr.c \ |
| 25 src/inet_addr.c \ | 25 src/inet_addr.c \ |
| 26 src/inet_pton.c \ | 26 src/inet_pton.c \ |
| 27 src/lockf.c \ | 27 src/lockf.c \ |
| 28 src/mktemp.c \ | 28 src/mktemp.c \ |
| 29 src/ns_name.c \ | 29 src/ns_name.c \ |
| 30 src/ns_netint.c \ | 30 src/ns_netint.c \ |
| 31 src/ns_samedomain.c \ | 31 src/ns_samedomain.c \ |
| 32 src/qsort_r.c \ | 32 src/qsort_r.c \ |
| 33 src/random.c \ | 33 src/random.c \ |
| 34 src/realpath.c \ | 34 src/realpath.c \ |
| 35 src/res_comp.c \ | 35 src/res_comp.c \ |
| 36 src/res_data.c \ | 36 src/res_data.c \ |
| 37 src/res_debug.c \ | 37 src/res_debug.c \ |
| 38 src/res_init.c \ | 38 src/res_init.c \ |
| 39 src/res_libc.c \ | 39 src/res_libc.c \ |
| 40 src/res_mkquery.c \ | 40 src/res_mkquery.c \ |
| 41 src/res_query.c \ | 41 src/res_query.c \ |
| 42 src/res_send.c | 42 src/res_send.c \ |
| 43 src/timegm.c \ |
| 44 src/writev.c |
| 43 | 45 |
| 44 OBJS := $(patsubst src/%.c,$(OUT)/%.o,$(SOURCES)) | 46 OBJS := $(patsubst src/%.c,$(OUT)/%.o,$(SOURCES)) |
| 45 | 47 |
| 46 ifeq ($(V),1) | 48 ifeq ($(V),1) |
| 47 CXX_PREFIX = | 49 CXX_PREFIX = |
| 48 CC_PREFIX = | 50 CC_PREFIX = |
| 49 AR_PREFIX = | 51 AR_PREFIX = |
| 50 else | 52 else |
| 51 CXX_PREFIX = @echo " CXX $@"; | 53 CXX_PREFIX = @echo " CXX $@"; |
| 52 CC_PREFIX = @echo " CC $@"; | 54 CC_PREFIX = @echo " CC $@"; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 77 $(OUT)/glibc_compat_test: $(OUT)/test.o $(LIB) | 79 $(OUT)/glibc_compat_test: $(OUT)/test.o $(LIB) |
| 78 @mkdir -p $(OUT) | 80 @mkdir -p $(OUT) |
| 79 $(CXX_PREFIX)$(CXX) -o $@ $< -L$(OUT) $(LDFLAGS) $(TEST_LIBS) | 81 $(CXX_PREFIX)$(CXX) -o $@ $< -L$(OUT) $(LDFLAGS) $(TEST_LIBS) |
| 80 | 82 |
| 81 test: $(OUT)/glibc_compat_test | 83 test: $(OUT)/glibc_compat_test |
| 82 | 84 |
| 83 clean: | 85 clean: |
| 84 rm -rf $(OUT) | 86 rm -rf $(OUT) |
| 85 | 87 |
| 86 .PHONY: test clean all | 88 .PHONY: test clean all |
| OLD | NEW |