]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - Makefile.in
build: Replace error2.pl by error2.c.
[paraslash.git] / Makefile.in
index c500fb9e4606e434649a410b06b9d988b7bbc15c..4160d257ac86684108104914e21d6171d1668bd6 100644 (file)
@@ -9,8 +9,11 @@ PACKAGE_VERSION := @PACKAGE_VERSION@
 PACKAGE_STRING := @PACKAGE_STRING@
 INSTALL := @install@
 STRIP := $(CROSS_COMPILE)strip
+HOSTCC ?= cc
 executables := $(addprefix para_, @executables@)
 ggo_descriptions_declared := @ggo_descriptions_declared@
+object_executable_matrix := @object_executable_matrix@
+
 
 GENGETOPT := @gengetopt@
 HELP2MAN := @help2man@
@@ -37,6 +40,7 @@ man_dir := $(build_dir)/man/man1
 cmdline_dir := $(build_dir)/cmdline
 m4depdir := $(build_dir)/m4deps
 help2man_dir := $(build_dir)/help2man
+hostbin_dir := $(build_dir)/host/bin
 
 DEBUG_CPPFLAGS += -g -Wunused -Wundef -W
 DEBUG_CPPFLAGS += -Wredundant-decls
@@ -106,7 +110,7 @@ man: $(man_pages)
 tarball: $(tarball)
 
 $(object_dir) $(man_dir) $(ggo_dir) $(cmdline_dir) $(dep_dir) $(m4depdir) \
-               $(help2man_dir):
+               $(help2man_dir) $(hostbin_dir):
        $(Q) $(MKDIR_P) $@
 
 -include $(m4_ggo_dir)/makefile
@@ -153,6 +157,12 @@ $(man_dir)/%.1: $(help2man_dir)/% | $(man_dir)
        @[ -z "$(Q)" ] || echo 'MAN $<'
        $(Q) $(HELP2MAN) -N ./$< > $@
 
+$(hostbin_dir)/error2: error2.c | $(hostbin_dir)
+       @[ -z "$(Q)" ] || echo 'HCC $<'
+       $(Q) $(HOSTCC) -o $@ $<
+error2.h: $(hostbin_dir)/error2
+       @[ -z "$(Q)" ] || echo 'ER2 $<'
+       @echo "$(object_executable_matrix)" | $< > $@
 $(object_dir)/crypt.o: crypt.c | $(object_dir)
        @[ -z "$(Q)" ] || echo 'CC $<'
        $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @openssl_cppflags@ $<