ObjFW  Check-in [dedb037552]

Overview
Comment:objfw-compile: Add --help
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: dedb0375527d72e881c704005832af71b6726534029347b899f00cf47fc00c13
User & Date: js on 2019-06-23 16:00:21
Other Links: manifest | tags
Context
2019-06-23
22:53
Add -[OFASN1BitString DEREncodedValue] check-in: ea6e0818b0 user: js tags: trunk
16:00
objfw-compile: Add --help check-in: dedb037552 user: js tags: trunk
2019-06-21
00:09
bridge: Add bridge for {OF,NS}Set check-in: 29ccaef03b user: js tags: trunk
Changes

Modified utils/objfw-compile from [d17fb67d0f] to [1209719f25].

36
37
38
39
40
41
42






























43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
				packages="$packages --package $1"
				;;
		esac
		shift
	done
}
parse_packages "$@"































CPPFLAGS="$CPPFLAGS $($OBJFW_CONFIG $packages --cppflags)"
OBJC="$($OBJFW_CONFIG --objc)"
OBJCFLAGS="$OBJCFLAGS $($OBJFW_CONFIG $packages --objcflags) -Wall -g"
LIBS="$LIBS $($OBJFW_CONFIG $packages --libs)"
LDFLAGS="$LDFLAGS $($OBJFW_CONFIG $packages --ldflags --rpath)"

if test x"$1" = "x"; then
	echo "Syntax: objfw-compile -o outname source1.m source2.m ..."
	exit 1
fi

status_compiling() {
	printf "\033[K\033[0;33mCompiling \033[1;33m%s\033[0;33m...\033[0m\r" \
		"$1"
}







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>








|







36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
				packages="$packages --package $1"
				;;
		esac
		shift
	done
}
parse_packages "$@"

show_help() {
	cat >&2 <<__EOF__
Syntax: objfw-compile -o output [flags] source1.m source2.mm ...

    -o name         Specify the output name (not file name!)
    --arc           Use automatic reference counting
    --lib version   Compile a library (with the specified version) instead of
                    an application
    --plugin        Compile a plugin instead of an application
    --package name  Use the specified package
    --builddir dir  Place built objects into the specified directory
    -D*  -D *       Pass the specified define to the compiler
    -framework *    Pass the specified -framework argument to the linker
                    (macOS / iOS only)
    -f*             Pass the specified -f flag to the compiler
    -F* -F *        Pass the specified -F flag to the linker (macOS / iOS only)
    -g*             Pass the specified -g flag to the compiler
    -I*  -I *       Pass the specified -I flag to the compiler
    -l*  -l *       Pass the specified -l flag to the linker
    -L*  -L *       Pass the specified -L flag to the linker
    -m*             Pass the specified -m flag to the compiler
    -O*             Pass the specified -O flag to the compiler
    -pthread        Pass -pthread to the compiler and linker
    -std=*          Pass the specified -std= flag to the compiler
    -Wl,*           Pass the specified -Wl, flag to the linker
    -W*             Pass the specified -W flag to the compiler"
    --help          Show this help
__EOF__
}

CPPFLAGS="$CPPFLAGS $($OBJFW_CONFIG $packages --cppflags)"
OBJC="$($OBJFW_CONFIG --objc)"
OBJCFLAGS="$OBJCFLAGS $($OBJFW_CONFIG $packages --objcflags) -Wall -g"
LIBS="$LIBS $($OBJFW_CONFIG $packages --libs)"
LDFLAGS="$LDFLAGS $($OBJFW_CONFIG $packages --ldflags --rpath)"

if test x"$1" = "x"; then
	show_help
	exit 1
fi

status_compiling() {
	printf "\033[K\033[0;33mCompiling \033[1;33m%s\033[0;33m...\033[0m\r" \
		"$1"
}
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206




207
208
209
210
211
212
213
		-L)
			shift
			LIBS="$LIBS -L$1"
			;;
		-L*)
			LIBS="$LIBS $1"
			;;
		-m)
			OBJCFLAGS="$OBJCFLAGS $1"
			;;
		-O*)
			OBJCFLAGS="$OBJCFLAGS $1"
			;;
		-pthread)
			OBJCFLAGS="$OBJCFLAGS $1"
			LDFLAGS="$LDFLAGS $1"
			;;
		-std=*)
			OBJCFLAGS="$OBJCFLAGS $1"
			;;
		-Wl,*)
			LDFLAGS="$LDFLAGS $1"
			;;
		-W*)
			OBJCFLAGS="$OBJCFLAGS $1"




			;;
		-*)
			echo "Unknown option: $1"
			exit 1
			;;
		*.m)
			srcs="$srcs $1"







|

















>
>
>
>







212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
		-L)
			shift
			LIBS="$LIBS -L$1"
			;;
		-L*)
			LIBS="$LIBS $1"
			;;
		-m*)
			OBJCFLAGS="$OBJCFLAGS $1"
			;;
		-O*)
			OBJCFLAGS="$OBJCFLAGS $1"
			;;
		-pthread)
			OBJCFLAGS="$OBJCFLAGS $1"
			LDFLAGS="$LDFLAGS $1"
			;;
		-std=*)
			OBJCFLAGS="$OBJCFLAGS $1"
			;;
		-Wl,*)
			LDFLAGS="$LDFLAGS $1"
			;;
		-W*)
			OBJCFLAGS="$OBJCFLAGS $1"
			;;
		--help)
			show_help
			exit 0
			;;
		-*)
			echo "Unknown option: $1"
			exit 1
			;;
		*.m)
			srcs="$srcs $1"