@@ -21,39 +21,39 @@ include $(J2OBJC_ROOT)/make/j2objc_deps.mk
21
21
include $(J2OBJC_ROOT ) /java_deps/jars.mk
22
22
23
23
SRCS = \
24
- com/google/protobuf/AbstractMessage.m \
25
- com/google/protobuf/AbstractMessageLite.m \
26
- com/google/protobuf/ByteString.m \
27
- com/google/protobuf/CodedInputStream.mm \
28
- com/google/protobuf/CodedOutputStream.mm \
29
- com/google/protobuf/Descriptors.m \
30
- com/google/protobuf/Extension.m \
31
- com/google/protobuf/ExtensionLite.m \
32
- com/google/protobuf/ExtensionRegistry.mm \
33
- com/google/protobuf/ExtensionRegistryLite.mm \
34
- com/google/protobuf/GeneratedMessage.mm \
35
- com/google/protobuf/InvalidProtocolBufferException.m \
36
- com/google/protobuf/MapEntry.m \
37
- com/google/protobuf/MapField.m \
38
- com/google/protobuf/ProtocolStringList.m \
39
- com/google/protobuf/RepeatedField.m \
40
- com/google/protobuf/WireFormat.mm
24
+ com/google/protobuf/AbstractMessage.m \
25
+ com/google/protobuf/AbstractMessageLite.m \
26
+ com/google/protobuf/ByteString.m \
27
+ com/google/protobuf/CodedInputStream.mm \
28
+ com/google/protobuf/CodedOutputStream.mm \
29
+ com/google/protobuf/Descriptors.m \
30
+ com/google/protobuf/Extension.m \
31
+ com/google/protobuf/ExtensionLite.m \
32
+ com/google/protobuf/ExtensionRegistry.mm \
33
+ com/google/protobuf/ExtensionRegistryLite.mm \
34
+ com/google/protobuf/GeneratedMessage.mm \
35
+ com/google/protobuf/InvalidProtocolBufferException.m \
36
+ com/google/protobuf/MapEntry.m \
37
+ com/google/protobuf/MapField.m \
38
+ com/google/protobuf/ProtocolStringList.m \
39
+ com/google/protobuf/RepeatedField.m \
40
+ com/google/protobuf/WireFormat.mm
41
41
42
42
# This headers list defines those headers included by all client code
43
43
# of the ProtobufRuntime framework.
44
44
FRAMEWORK_PUBLIC_HEADERS = \
45
- com/google/protobuf/AbstractMessage.h \
46
- com/google/protobuf/AbstractMessageLite.h \
47
- com/google/protobuf/ByteString.h \
48
- com/google/protobuf/Descriptors.h \
49
- com/google/protobuf/Extension.h \
50
- com/google/protobuf/ExtensionLite.h \
51
- com/google/protobuf/ExtensionRegistry.h \
52
- com/google/protobuf/ExtensionRegistryLite.h \
53
- com/google/protobuf/GeneratedMessage.h \
54
- com/google/protobuf/InvalidProtocolBufferException.h \
55
- com/google/protobuf/MapEntry.h \
56
- com/google/protobuf/ProtocolStringList.h
45
+ com/google/protobuf/AbstractMessage.h \
46
+ com/google/protobuf/AbstractMessageLite.h \
47
+ com/google/protobuf/ByteString.h \
48
+ com/google/protobuf/Descriptors.h \
49
+ com/google/protobuf/Extension.h \
50
+ com/google/protobuf/ExtensionLite.h \
51
+ com/google/protobuf/ExtensionRegistry.h \
52
+ com/google/protobuf/ExtensionRegistryLite.h \
53
+ com/google/protobuf/GeneratedMessage.h \
54
+ com/google/protobuf/InvalidProtocolBufferException.h \
55
+ com/google/protobuf/MapEntry.h \
56
+ com/google/protobuf/ProtocolStringList.h
57
57
58
58
SRC_DIR = $(CURDIR ) /src
59
59
@@ -81,8 +81,8 @@ ALL_SOURCES_FULL = $(HEADERS) $(SOURCES_FULL)
81
81
J2OBJCC = $(ARCH_BIN_DIR ) /j2objcc
82
82
83
83
C_FLAGS = $(DEBUGFLAGS ) -Werror -Wobjc-missing-property-synthesis -Wshorten-64-to-32 \
84
- -Wsign-compare -fobjc-abi-version=2 -fobjc-legacy-dispatch -stdlib=libc++ \
85
- -Wno-nullability-completeness
84
+ -Wsign-compare -fobjc-abi-version=2 -fobjc-legacy-dispatch -stdlib=libc++ \
85
+ -Wno-nullability-completeness
86
86
INCLUDE_DIRS = src $(GEN_OBJC_DIR )
87
87
88
88
FAT_LIB_NAME = protobuf_runtime
@@ -105,36 +105,41 @@ PROTOC_PLUGIN = $(DIST_DIR)/j2objc_protoc_plugin
105
105
$(PROTOC_PLUGIN ) : protobuf_compiler_dist
106
106
@:
107
107
108
- dist : $(DIST_JAR ) $(FAT_LIBS_DIST ) $(ARCH_BUILD_DIR ) /.dist_headers $(PROTOBUF_LICENSE_DIST )
108
+ dist : framework | $(BUILD_DIR )
109
+
110
+ lib : $(DIST_JAR ) $(FAT_LIBS_DIST ) $(ARCH_BUILD_DIR ) /.dist_headers $(PROTOBUF_LICENSE_DIST )
109
111
@:
110
112
111
113
java : $(DIST_JAR )
112
114
@:
113
115
114
- generate : $(ALL_SOURCES_FULL )
116
+ generate : $(ALL_SOURCES_FULL ) | $( BUILD_DIR )
115
117
116
- objc_sources_manifest : $(OBJC_SOURCES_MANIFEST )
118
+ objc_sources_manifest : $(OBJC_SOURCES_MANIFEST ) | $( BUILD_DIR )
117
119
@:
118
120
119
- $(OBJC_SOURCES_MANIFEST ) :
121
+ $(OBJC_SOURCES_MANIFEST ) : | $( BUILD_DIR )
120
122
@mkdir -p $(@D )
121
123
@echo " Building $$ (basename $@ )"
122
124
@if [ -e $@ ]; then rm $@ ; fi
123
125
@files=' $(ALL_SOURCES_FULL)' && for i in $$ files; do \
124
- echo $$ i >> $@ ; \
126
+ echo $$ i >> $@ ; \
125
127
done
126
128
127
129
$(PROTOBUF_LICENSE_DIST ) : $(PROTOBUF_LICENSE )
128
130
@mkdir -p $(@D )
129
131
@install -m 0644 $< $@
130
132
133
+ $(BUILD_DIR ) :
134
+ @mkdir -p $@
135
+
131
136
clean :
132
137
@rm -rf $(BUILD_DIR ) $(DIST_JAR ) $(FAT_LIBS_DIST ) $(DIST_HEADERS )
133
138
@rm -rf $(PROTOBUF_LICENSE_DIST )
134
139
@rm -rf $(FRAMEWORK_DIR )
135
140
136
141
DESCRIPTOR_PROTO_M_CMD = $(PROTOBUF_PROTOC ) --plugin=protoc-gen-j2objc=$(PROTOC_PLUGIN ) \
137
- --proto_path=$(PROTOBUF_INCLUDE_PATH ) --j2objc_out=$(GEN_OBJC_DIR ) $(DESCRIPTOR_PROTO )
142
+ --proto_path=$(PROTOBUF_INCLUDE_PATH ) --j2objc_out=$(GEN_OBJC_DIR ) $(DESCRIPTOR_PROTO )
138
143
139
144
$(DESCRIPTOR_PROTO_M ) : $(DESCRIPTOR_PROTO ) $(PROTOC_PLUGIN )
140
145
@mkdir -p $(@D )
0 commit comments