blob: 3794826530bf593a0672edd6a87a597a56e733c3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
$NetBSD: patch-aa,v 1.1 2007/08/06 11:49:51 joerg Exp $
--- src/Makefile.am.orig 2006-04-03 23:26:31.000000000 +0200
+++ src/Makefile.am
@@ -1,6 +1,6 @@
lib_LTLIBRARIES = liblbxutil.la
-noinst_PROGRAMS = mkg3states
+noinst_PROGRAMS = mkg3states ${MKG3STATES_PROG}
mkg3states_SOURCES = \
$(srcdir)/image/mkg3states.c
@@ -20,6 +20,18 @@ liblbxutil_la_SOURCES = \
$(srcdir)/image/lbxbwcodes.h \
$(srcdir)/delta/lbxdelta.c
+if CROSS_COMPILING
+MKG3STATES_PROG= xmkg3states$(EXEEXT)
+MKG3STATES= ./xmkg3states
+
+xmkg3states$(EXEEXT): $(srcdir)/image/mkg3states.c
+ $(CC_FOR_BUILD) $(X11_CFLAGS) $(CPPFLAGS_FOR_BUILD) \
+ $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ $(srcdir)/image/mkg3states.c
+else
+MKG3STATES= ./mkg3states
+endif
+
+
nodist_liblbxutil_la_SOURCES = g3states.h
liblbxutil_la_LIBADD = @LBXUTIL_LIBS@
@@ -28,9 +40,9 @@ INCLUDES = @LBXUTIL_CFLAGS@
$(srcdir)/image/dfaxg42d.c: g3states.h
-g3states.h: mkg3states
+g3states.h: ${MKG3STATES_PROG} mkg3states$(EXEEXT)
-rm -f g3states.h
- ./mkg3states -c > g3states.h_ && mv g3states.h_ g3states.h
+ ${MKG3STATES} -c > g3states.h_ && mv g3states.h_ g3states.h
liblbxutil_la_LDFLAGS = -version-number 1:0:0 -no-undefined
|