gcc_flags := $(gcc_optimizations) $(debug) -ffunction-sections -fdata-sections -Isrc/org/ijg
gcj_flags := -fCLASSPATH=bin
gcj := $(gcc_path)/bin/$(target)-gcj $(gcj_flags) $(gcc_flags)
-gcc := $(gcc_path)/bin/$(target)-g++ $(gcc_flags)
+g++ := $(gcc_path)/bin/$(target)-g++ $(gcc_flags)
+gcc := $(gcc_path)/bin/$(target)-gcc $(gcc_flags)
gcjh := $(gcc_path)/bin/$(target)-gcjh
ar := $(gcc_path)/$(target)/bin/ar
strip := $(gcc_path)/$(target)/bin/strip
link: $(java_objects) $(cc_objects) $(c_objects) bin-$(platform)/org/xwt/builtin.o
echo "linking .o -> $(target_bin)"
$(ar) r bin-$(platform)/org/xwt/plat/platform.ar bin-$(platform)/org/xwt/plat/*.o
- $(gcj) --main=org.xwt.Main -o bin-$(platform)/$(target_bin) $^ $(platform_link) bin-$(platform)/org/xwt/plat/platform.ar
+ $(gcj) --main=org.xwt.Main -o bin-$(platform)/$(target_bin) $^ -lstdc++ $(platform_link) bin-$(platform)/org/xwt/plat/platform.ar
.headers: $(java_classes)
cd bin; for A in `find * -name \*.class`; do \
$(cc_objects): bin-$(platform)/%.cc.o: src/%.cc src/org/ijg/jmorecfg.h
@echo "compiling .cc -> .o: $<"
@mkdir -p `dirname $@`
- $(gcc) -Ibin -c $< -o $@
+ $(g++) -Ibin -c $< -o $@
$(c_objects): bin-$(platform)/%.c.o: src/%.c src/org/ijg/jmorecfg.h
@echo "compiling .c -> .o: $<"
current_build := $(shell cat next.build)
this_branch := $(shell tail -c +2 CVS/Tag 2>/dev/null || echo HEAD)
-this_branch_flag := $(shell test $this_branch = HEAD && echo || echo -r $this_branch)
+this_branch_flag := $(shell test $(this_branch) = HEAD && echo || echo -r $(this_branch))
dist:
# this will fail if we haven't checked-in since the comment is null; we want this.