Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: Makefile

Issue 6612044: Added an SmsMessage class, and code for parsing a PDU to an SMS message. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/cromo.git@master
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | sms_message.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 # method for exporting symbols does not export symbols for libraries. 61 # method for exporting symbols does not export symbols for libraries.
62 # So we link against utilities.o, but external tests link against 62 # So we link against utilities.o, but external tests link against
63 # libcromo (which is currently just utilities.o) 63 # libcromo (which is currently just utilities.o)
64 64
65 SRCS = carrier.cc \ 65 SRCS = carrier.cc \
66 cromo_server.cc \ 66 cromo_server.cc \
67 hooktable.cc \ 67 hooktable.cc \
68 main.cc \ 68 main.cc \
69 modem_handler.cc \ 69 modem_handler.cc \
70 plugin_manager.cc \ 70 plugin_manager.cc \
71 sms_message.cc \
71 utilities.cc 72 utilities.cc
72 73
73 OBJS = $(SRCS:.cc=.o) 74 OBJS = $(SRCS:.cc=.o)
74 75
75 TARGETS = $(CROMO) $(LIBCROMO) $(PLUGINS) 76 TARGETS = $(CROMO) $(LIBCROMO) $(PLUGINS)
76 TESTS = cromo_server_unittest utilities_unittest 77 TESTS = cromo_server_unittest sms_message_unittest utilities_unittest
77 78
78 INSTALL_TARGETS = install-programs install-libs install-headers 79 INSTALL_TARGETS = install-programs install-libs install-headers
79 80
80 ifdef INSTALL_TESTS 81 ifdef INSTALL_TESTS
81 TARGETS += $(TESTS) 82 TARGETS += $(TESTS)
82 INSTALL_TARGETS += install-tests 83 INSTALL_TARGETS += install-tests
83 endif 84 endif
84 85
85 86
86 dummy_SRCS = dummy_modem_handler.cc \ 87 dummy_SRCS = dummy_modem_handler.cc \
87 dummy_modem.cc 88 dummy_modem.cc
88 dummy_OBJS = $(dummy_SRCS:.cc=.o) 89 dummy_OBJS = $(dummy_SRCS:.cc=.o)
89 90
90 all : $(TARGETS) 91 all : $(TARGETS)
91 92
92 %unittest : 93 %unittest :
93 $(CXX) $^ $(LDLIBS_UNITTEST) -o $@ 94 $(CXX) $^ $(LDLIBS_UNITTEST) -o $@
94 95
95 glue: $(patsubst %,$(DBUSIFACEDIR)/%,$(XMLFILES)) 96 glue: $(patsubst %,$(DBUSIFACEDIR)/%,$(XMLFILES))
96 @for xml in $(XMLFILES); do \ 97 @for xml in $(XMLFILES); do \
97 hdr=$$(./iface2header "$(XMLPREFIX)" $(EMPTY) $$xml); \ 98 hdr=$$(./iface2header "$(XMLPREFIX)" $(EMPTY) $$xml); \
98 echo "xml2cpp $$xml -> $$hdr"; \ 99 echo "xml2cpp $$xml -> $$hdr"; \
99 $(DBUSXX_XML2CPP) $(DBUSIFACEDIR)/$$xml --adaptor=$$hdr; \ 100 $(DBUSXX_XML2CPP) $(DBUSIFACEDIR)/$$xml --adaptor=$$hdr; \
100 done 101 done
101 102
102 $(OBJS): glue 103 $(OBJS) cromo_server_unittest.o: glue
103 $(dummy_OBJS): glue 104 $(dummy_OBJS): glue
104 105
105 $(CROMO): $(OBJS) $(SYMFILE) $(LIBCROMO) 106 $(CROMO): $(OBJS) $(SYMFILE) $(LIBCROMO)
106 $(CXX) $(LDFLAGS_CROMO) $(OBJS) $(LDLIBS) -o $@ 107 $(CXX) $(LDFLAGS_CROMO) $(OBJS) $(LDLIBS) -o $@
107 108
108 $(LIBCROMO): cromo_server.o hooktable.o utilities.o modem_handler.o 109 $(LIBCROMO): cromo_server.o hooktable.o utilities.o modem_handler.o \
110 » sms_message.o
109 $(AR) r $@ $^ 111 $(AR) r $@ $^
110 112
111 cromo_server_unittest: carrier.o cromo_server_unittest.o cromo_server.o hooktabl e.o 113 cromo_server_unittest: carrier.o cromo_server_unittest.o cromo_server.o hooktabl e.o
112 utilities_unittest: utilities_unittest.o $(LIBCROMO) 114 utilities_unittest: utilities_unittest.o $(LIBCROMO)
115 sms_message_unittest: sms_message_unittest.o $(LIBCROMO)
113 116
114 dummy_modem.so: $(dummy_OBJS) 117 dummy_modem.so: $(dummy_OBJS)
115 $(CXX) -shared -o $@ $^ 118 $(CXX) -shared -o $@ $^
116 119
117 # Export symbols used by plugins 120 # Export symbols used by plugins
118 KEEP_SYMS:= "_ZN11CromoServer \ 121 KEEP_SYMS:= "_ZN11CromoServer \
119 _ZN9HookTable \ 122 _ZN9HookTable \
120 _ZN12ModemHandler \ 123 _ZN12ModemHandler \
121 _ZN9utilities" 124 _ZN9utilities \
125 _ZN10SmsMessage13CreateMessage"
122 126
123 $(SYMFILE): cromo_server.o hooktable.o modem_handler.o $(LIBCROMO) 127 $(SYMFILE): cromo_server.o hooktable.o modem_handler.o $(LIBCROMO)
124 @echo '{' >$@ 128 @echo '{' >$@
125 @for sym in "$(KEEP_SYMS)"; do \ 129 @for sym in "$(KEEP_SYMS)"; do \
126 nm --defined-only $^ | grep "T $${sym}" \ 130 nm --defined-only $^ | grep "T $${sym}" \
127 | awk '{print " "$$3";"}' >>$@ ; \ 131 | awk '{print " "$$3";"}' >>$@ ; \
128 done 132 done
129 @echo '};' >>$@ 133 @echo '};' >>$@
130 @echo Exported symbols 134 @echo Exported symbols
131 @cat $@ 135 @cat $@
132 136
133 EXPORT_HEADERS=$(GLUE_HEADERS) modem_handler.h cromo_server.h plugin.h \ 137 EXPORT_HEADERS=$(GLUE_HEADERS) modem_handler.h cromo_server.h plugin.h \
134 hooktable.h carrier.h utilities.h modem.h 138 hooktable.h carrier.h utilities.h modem.h \
139 » » » sms_message.h
135 140
136 install-headers: glue 141 install-headers: glue
137 install -d $(DESTDIR)/usr/include/cromo 142 install -d $(DESTDIR)/usr/include/cromo
138 install -t $(DESTDIR)/usr/include/cromo $(EXPORT_HEADERS) 143 install -t $(DESTDIR)/usr/include/cromo $(EXPORT_HEADERS)
139 144
140 install-programs: 145 install-programs:
141 install -d $(DESTDIR)$(PLUGINDIR) \ 146 install -d $(DESTDIR)$(PLUGINDIR) \
142 $(DESTDIR)$(DBUSDATADIR) \ 147 $(DESTDIR)$(DBUSDATADIR) \
143 $(DESTDIR)/usr/sbin \ 148 $(DESTDIR)/usr/sbin \
144 $(DESTDIR)/usr/bin 149 $(DESTDIR)/usr/bin
(...skipping 18 matching lines...) Expand all
163 # Boilerplate for automatically calculating dependencies 168 # Boilerplate for automatically calculating dependencies
164 #.%.d: %.cc 169 #.%.d: %.cc
165 # $(CXX) -MM $(CPPFLAGS) $(CXXFLAGS) -MF $@ -MT $(<:.cc=.o) -MT $@ $< 170 # $(CXX) -MM $(CPPFLAGS) $(CXXFLAGS) -MF $@ -MT $(<:.cc=.o) -MT $@ $<
166 171
167 #depfiles = $(patsubst %.cc,.%.d,$(SRCS))) 172 #depfiles = $(patsubst %.cc,.%.d,$(SRCS)))
168 #$(depfiles): $(GLUE_HEADERS) 173 #$(depfiles): $(GLUE_HEADERS)
169 174
170 #ifneq ($(MAKECMDGOALS),clean) 175 #ifneq ($(MAKECMDGOALS),clean)
171 #include $(depfiles) 176 #include $(depfiles)
172 #endif 177 #endif
OLDNEW
« no previous file with comments | « no previous file | sms_message.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698