ObjFW  Diff

Differences From Artifact [32d4cb25d4]:

To Artifact [505c826ae7]:


46
47
48
49
50
51
52

53
54
55
56
57
58
59
	exit $2
}

flags_done="no"
out=""
objs=""
link="no"

out_prefix=""
out_suffix=""

while test x"$1" != "x"; do
	case "$1" in
		-o|--out)
			shift







>







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
	exit $2
}

flags_done="no"
out=""
objs=""
link="no"
lib="no"
out_prefix=""
out_suffix=""

while test x"$1" != "x"; do
	case "$1" in
		-o|--out)
			shift
73
74
75
76
77
78
79

80
81
82
83
84
85
86
				echo "$1 is not a valid library version!"
				exit 1
			fi

			export LIB_MAJOR="${1%.*}"
			export LIB_MINOR="${1#*.}"


			OBJCFLAGS="$OBJCFLAGS $($OBJFW_CONFIG --lib-cflags)"
			LDFLAGS="$LDFLAGS $($OBJFW_CONFIG --lib-ldflags)"
			out_prefix="$($OBJFW_CONFIG --lib-prefix)"
			out_suffix="$($OBJFW_CONFIG --lib-suffix)"
			;;
		-*)
			echo "Unknown option: $1"







>







74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
				echo "$1 is not a valid library version!"
				exit 1
			fi

			export LIB_MAJOR="${1%.*}"
			export LIB_MINOR="${1#*.}"

			lib="yes"
			OBJCFLAGS="$OBJCFLAGS $($OBJFW_CONFIG --lib-cflags)"
			LDFLAGS="$LDFLAGS $($OBJFW_CONFIG --lib-ldflags)"
			out_prefix="$($OBJFW_CONFIG --lib-prefix)"
			out_suffix="$($OBJFW_CONFIG --lib-suffix)"
			;;
		-*)
			echo "Unknown option: $1"
119
120
121
122
123
124
125


126
127
128
129
130
131
132
	shift
done

if test x"$out" = x""; then
	echo "No output name specified! Use -o or --out!"
	exit 1
fi



if test ! -f "$out_prefix$out$out_suffix" -o x"$link" = x"yes"; then
	status_linking $out_prefix$out$out_suffix
	$OBJC -o $out_prefix$out$out_suffix $objs $LIBS $ENV_LIBS $LDFLAGS \
		$ENV_LDFLAGS || status_link_failed $out $?
	status_linked $out_prefix$out$out_suffix
fi







>
>







121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
	shift
done

if test x"$out" = x""; then
	echo "No output name specified! Use -o or --out!"
	exit 1
fi

test x"$lib" = x"no" && out_suffix="$($OBJFW_CONFIG --prog-suffix)"

if test ! -f "$out_prefix$out$out_suffix" -o x"$link" = x"yes"; then
	status_linking $out_prefix$out$out_suffix
	$OBJC -o $out_prefix$out$out_suffix $objs $LIBS $ENV_LIBS $LDFLAGS \
		$ENV_LDFLAGS || status_link_failed $out $?
	status_linked $out_prefix$out$out_suffix
fi