Merged core/ and stream/ -> src/. The split wasn't worth it.

pull/13171/head
Joshua Haberman 14 years ago
parent ee84a7da16
commit 6bdbb45e88
  1. 42
      Makefile
  2. 0
      src/upb.c
  3. 0
      src/upb.h
  4. 0
      src/upb_atomic.h
  5. 0
      src/upb_decoder.c
  6. 0
      src/upb_decoder.h
  7. 0
      src/upb_def.c
  8. 0
      src/upb_def.h
  9. 0
      src/upb_encoder.c
  10. 0
      src/upb_encoder.h
  11. 0
      src/upb_glue.c
  12. 0
      src/upb_glue.h
  13. 0
      src/upb_msg.c
  14. 0
      src/upb_msg.h
  15. 0
      src/upb_stdio.c
  16. 0
      src/upb_stdio.h
  17. 0
      src/upb_stream.h
  18. 0
      src/upb_stream_vtbl.h
  19. 0
      src/upb_string.c
  20. 0
      src/upb_string.h
  21. 0
      src/upb_strstream.c
  22. 0
      src/upb_strstream.h
  23. 0
      src/upb_table.c
  24. 0
      src/upb_table.h
  25. 0
      src/upb_textprinter.c
  26. 0
      src/upb_textprinter.h

@ -27,9 +27,9 @@ rwildcard=$(strip $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2)$(filter $
CC=gcc
CXX=g++
CFLAGS=-std=c99
INCLUDE=-Idescriptor -Icore -Itests -Istream -I.
INCLUDE=-Idescriptor -Isrc -Itests -I.
CPPFLAGS=-Wall -Wextra -Wno-missing-field-initializers -g $(INCLUDE) $(strip $(shell test -f perf-cppflags && cat perf-cppflags))
LDLIBS=-lpthread core/libupb.a
LDLIBS=-lpthread src/libupb.a
ifeq ($(shell uname), Darwin)
CPPFLAGS += -I/usr/include/lua5.1
LDFLAGS += -L/usr/local/lib -llua
@ -38,14 +38,14 @@ else
LDFLAGS += $(strip $(shell pkg-config --silence-errors --libs lua || pkg-config --libs lua5.1))
endif
LIBUPB=core/libupb.a
LIBUPB_PIC=core/libupb_pic.a
LIBUPB_SHARED=core/libupb.so
LIBUPB=src/libupb.a
LIBUPB_PIC=src/libupb_pic.a
LIBUPB_SHARED=src/libupb.so
ALL=deps $(OBJ) $(LIBUPB) $(LIBUPB_PIC)
all: $(ALL)
clean:
rm -rf $(LIBUPB) $(LIBUPB_PIC)
rm -rf $(call rwildcard,,*.o) $(call rwildcard,,*.lo) $(call rwildcard,,*.gc*)
rm -rf $(call rwildcard,,*.o) $(call rwildcard,,*.lo) $(call rwildcard,,*.gcno) $(call rwildcard,,*.dSYM)
rm -rf benchmark/google_messages.proto.pb benchmark/google_messages.pb.* benchmarks/b.* benchmarks/*.pb*
rm -rf $(TESTS) tests/t.*
rm -rf descriptor/descriptor.pb
@ -59,20 +59,20 @@ deps: gen-deps.sh Makefile $(call rwildcard,,*.c) $(call rwildcard,,*.h)
# The core library -- the absolute minimum you must compile in to successfully
# bootstrap.
CORE= \
core/upb.c \
core/upb_table.c \
core/upb_string.c \
core/upb_def.c \
src/upb.c \
src/upb_table.c \
src/upb_string.c \
src/upb_def.c \
descriptor/descriptor.c
# Common encoders/decoders and upb_msg -- you're almost certain to want these.
STREAM= \
stream/upb_decoder.c \
stream/upb_stdio.c \
stream/upb_textprinter.c \
stream/upb_strstream.c \
core/upb_msg.c \
core/upb_glue.c \
src/upb_decoder.c \
src/upb_stdio.c \
src/upb_textprinter.c \
src/upb_strstream.c \
src/upb_msg.c \
src/upb_glue.c \
SRC=$(CORE) $(STREAM)
@ -81,13 +81,13 @@ $(SRC): perf-cppflags
OTHERSRC=src/upb_encoder.c src/upb_text.c
# Override the optimization level for upb_def.o, because it is not in the
# critical path but gets very large when -O3 is used.
core/upb_def.o: core/upb_def.c
src/upb_def.o: src/upb_def.c
$(CC) $(CFLAGS) $(CPPFLAGS) -Os -c -o $@ $<
core/upb_def.lo: core/upb_def.c
src/upb_def.lo: src/upb_def.c
$(CC) $(CFLAGS) $(CPPFLAGS) -Os -c -o $@ $< -fPIC
lang_ext/lua/upb.so: lang_ext/lua/upb.lo
$(CC) $(CFLAGS) $(CPPFLAGS) -shared -o $@ $< core/libupb_pic.a
$(CC) $(CFLAGS) $(CPPFLAGS) -shared -o $@ $< src/libupb_pic.a
STATICOBJ=$(patsubst %.c,%.o,$(SRC))
@ -171,10 +171,10 @@ tests/test_table: tests/test_table.cc
# Includes <hash_set> which is a deprecated header.
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -Wno-deprecated -o $@ $< $(LIBUPB)
tests/tests: core/libupb.a
tests/tests: src/libupb.a
# Tools
tools/upbc: core/libupb.a
tools/upbc: src/libupb.a
# Benchmarks
#UPB_BENCHMARKS=benchmarks/b.parsetostruct_googlemessage1.upb_table \

Loading…
Cancel
Save