summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJosh Haberman <jhaberman@gmail.com>2017-07-08 00:00:05 -0700
committerJosh Haberman <jhaberman@gmail.com>2017-07-08 00:00:05 -0700
commit1aafd4111b9b6d08d2d0937b0f396a4caa9ea04d (patch)
tree9bcb6c61ee333de00819973f3a3acd8aab9238e5 /Makefile
parentdd536fd567b2ba9bed67a0094c5cd905c774f951 (diff)
A good start on upb_encode and upb_decode.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 18 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 597476c..390e7af 100644
--- a/Makefile
+++ b/Makefile
@@ -110,7 +110,7 @@ clean_leave_profile:
@rm -rf obj lib
@rm -f tests/google_message?.h
@rm -f tests/json/test.upbdefs.o
- @rm -f $(TESTS) tests/testmain.o tests/t.*
+ @rm -f $(TESTS) tests/testmain.o tests/t.* tests/conformance_upb
@rm -rf tools/upbc deps
@rm -rf upb/bindings/python/build
@rm -f upb/bindings/ruby/Makefile
@@ -148,7 +148,9 @@ make_objs_cc = $$(patsubst upb/$$(pc).cc,obj/upb/$$(pc).$(1),$$($$(call to_srcs,
# Core libraries (ie. not bindings). ###############################################################
upb_SRCS = \
+ upb/decode.c \
upb/def.c \
+ upb/encode.c \
upb/handlers.c \
upb/msg.c \
upb/refcounted.c \
@@ -361,6 +363,21 @@ test:
done;
@echo "All tests passed!"
+obj/conformance_protos: obj/conformance_protos.pb tools/upbc
+ cd obj && ../tools/upbc conformance_protos.pb && touch conformance_protos
+
+obj/conformance_protos.pb: third_party/protobuf/autogen.sh
+ protoc -Ithird_party/protobuf/conformance -Ithird_party/protobuf/src --include_imports \
+ third_party/protobuf/conformance/conformance.proto \
+ third_party/protobuf/src/google/protobuf/test_messages_proto3.proto \
+ -o obj/conformance_protos.pb
+
+third_party/protouf/autogen.sh: .gitmodules
+ git submodule init && git submodule update
+
+tests/conformance_upb: tests/conformance_upb.c lib/libupb.a obj/conformance_protos
+ $(CC) -o tests/conformance_upb tests/conformance_upb.c -Iobj -I. $(CPPFLAGS) $(CFLAGS) obj/conformance.upb.c obj/google/protobuf/*.upb.c lib/libupb.a
+
# Google protobuf binding ######################################################
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback