OLD | NEW |
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2010 The Chromium OS 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 PKG_CONFIG ?= pkg-config | 5 PKG_CONFIG ?= pkg-config |
6 INCLUDE_DIRS = $(shell $(PKG_CONFIG) --cflags gobject-2.0 \ | 6 INCLUDE_DIRS = $(shell $(PKG_CONFIG) --cflags gobject-2.0 \ |
7 dbus-1 dbus-glib-1 dbus-c++-1) | 7 dbus-1 dbus-glib-1 dbus-c++-1) |
8 CPPFLAGS ?= $(INCLUDE_DIRS) $($(*F)_CPPFLAGS) | 8 CPPFLAGS ?= $(INCLUDE_DIRS) $($(*F)_CPPFLAGS) |
9 CXXFLAGS += -Wall -Werror -g -O0 $($(*F)_CXXFLAGS) | 9 CXXFLAGS += -Wall -Werror -g -O0 $($(*F)_CXXFLAGS) |
10 LDLIBS = $(shell $(PKG_CONFIG) --libs gobject-2.0 gthread-2.0 \ | 10 LDLIBS = $(shell $(PKG_CONFIG) --libs gobject-2.0 gthread-2.0 \ |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 $(CROMO): $(OBJS) $(SYMFILE) | 82 $(CROMO): $(OBJS) $(SYMFILE) |
83 $(CXX) $(LDFLAGS_CROMO) $(OBJS) $(LDLIBS) -o $@ | 83 $(CXX) $(LDFLAGS_CROMO) $(OBJS) $(LDLIBS) -o $@ |
84 | 84 |
85 cellular_unittest: cellular.o cellular_unittest.o | 85 cellular_unittest: cellular.o cellular_unittest.o |
86 cromo_server_unittest: carrier.o cromo_server_unittest.o cromo_server.o hooktabl
e.o | 86 cromo_server_unittest: carrier.o cromo_server_unittest.o cromo_server.o hooktabl
e.o |
87 | 87 |
88 dummy_modem.so: $(dummy_OBJS) | 88 dummy_modem.so: $(dummy_OBJS) |
89 $(CXX) -shared -o $@ $^ | 89 $(CXX) -shared -o $@ $^ |
90 | 90 |
91 # Export symbols used by plugins | 91 # Export symbols used by plugins |
92 KEEP_SYMS:= "_ZN8Cellular \ | 92 KEEP_SYMS:= "_ZN8cellular \ |
93 _ZN11CromoServer.*Carrier \ | 93 _ZN11CromoServer.*Carrier \ |
94 _ZN9HookTable \ | 94 _ZN9HookTable \ |
95 _ZN12ModemHandler" | 95 _ZN12ModemHandler" |
96 | 96 |
97 $(SYMFILE): cellular.o cromo_server.o hooktable.o modem_handler.o | 97 $(SYMFILE): cellular.o cromo_server.o hooktable.o modem_handler.o |
98 @echo '{' >$@ | 98 @echo '{' >$@ |
99 @for sym in "$(KEEP_SYMS)"; do \ | 99 @for sym in "$(KEEP_SYMS)"; do \ |
100 nm --defined-only $^ | grep "T $${sym}" \ | 100 nm --defined-only $^ | grep "T $${sym}" \ |
101 | awk '{print " "$$3";"}' >>$@ ; \ | 101 | awk '{print " "$$3";"}' >>$@ ; \ |
102 done | 102 done |
(...skipping 25 matching lines...) Expand all Loading... |
128 # Boilerplate for automatically calculating dependencies | 128 # Boilerplate for automatically calculating dependencies |
129 #.%.d: %.cc | 129 #.%.d: %.cc |
130 # $(CXX) -MM $(CPPFLAGS) $(CXXFLAGS) -MF $@ -MT $(<:.cc=.o) -MT $@ $< | 130 # $(CXX) -MM $(CPPFLAGS) $(CXXFLAGS) -MF $@ -MT $(<:.cc=.o) -MT $@ $< |
131 | 131 |
132 #depfiles = $(patsubst %.cc,.%.d,$(SRCS))) | 132 #depfiles = $(patsubst %.cc,.%.d,$(SRCS))) |
133 #$(depfiles): $(GLUE_HEADERS) | 133 #$(depfiles): $(GLUE_HEADERS) |
134 | 134 |
135 #ifneq ($(MAKECMDGOALS),clean) | 135 #ifneq ($(MAKECMDGOALS),clean) |
136 #include $(depfiles) | 136 #include $(depfiles) |
137 #endif | 137 #endif |
OLD | NEW |