aboutsummaryrefslogtreecommitdiff
path: root/recipes/tofrodos/tofrodos-native/0001-Make-OE-friendly.patch
blob: 1dd8281dfbccd2b22140253a2f2d6a8a9177a5f7 (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
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
From 7ae01e1346c9645e27d49427679b2fd521534588 Mon Sep 17 00:00:00 2001
From: Jason Kridner <jkridner@beagleboard.org>
Date: Thu, 19 Aug 2010 08:17:17 -0500
Subject: [PATCH] Make OE friendly

Pulled changes from OE's cross.patch, but added portions to create
directories on install.

Signed-off-by: Jason Kridner <jkridner@beagleboard.org>
---
 src/Makefile |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/Makefile b/src/Makefile
index db9c2a4..f82afcf 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -23,13 +23,11 @@ VERSTR = 0.0
 endif
 
 # programs
-CC = gcc
 CD = cd
 CP = cp
 GZIP = gzip
 INSTALL = install
 LN = ln
-LD = gcc
 MAKE = make
 MKDIR = mkdir
 MV = mv
@@ -38,7 +36,7 @@ TAR = tar
 ZIP = zip
 
 # flags
-CFLAGS = $(DEFINES) $(TFLAG) $(CDEBUG) -c -Wall
+CCFLAGS = $(DEFINES) $(TFLAG) $(CDEBUG) -c -Wall
 GZIPFLAGS = -9
 INSTALLBINFLAGS = -m 755
 INSTALLDATAFLAGS = -m 644
@@ -96,7 +94,7 @@ OBJS =	emsg.o \
 
 # implicit rules
 .c.o:
-	$(CC) $(CFLAGS) $<
+	$(CC) $(CCFLAGS) $(CFLAGS) $<
 
 # user visible rules
 all: $(FROMDOS) $(TODOS)
@@ -119,12 +117,14 @@ distclean: clobber
 	$(RM) $(RMRECURFLAGS) $(DISTDIR)
 
 install: installman
-	$(INSTALL) $(INSTALLBINFLAGS) $(FROMDOS) $(BINDIR)
-	($(CD) $(BINDIR) ; $(LN) $(LNFLAGS) fromdos todos)
+	$(INSTALL) -d $(DESTDIR)$(BINDIR)
+	$(INSTALL) $(INSTALLBINFLAGS) $(FROMDOS) $(DESTDIR)$(BINDIR)
+	($(CD) $(DESTDIR)$(BINDIR) ; $(LN) $(LNFLAGS) fromdos todos)
 
 installman: $(FROMDOSMAN)
-	$(INSTALL) $(INSTALLDATAFLAGS) $(FROMDOSMAN) $(MANDIR)
-	($(CD) $(MANDIR) ; $(LN) $(LNFLAGS) fromdos.1 todos.1)
+	$(INSTALL) -d $(DESTDIR)$(MANDIR)
+	$(INSTALL) $(INSTALLDATAFLAGS) $(FROMDOSMAN) $(DESTDIR)$(MANDIR)
+	($(CD) $(DESTDIR)$(MANDIR) ; $(LN) $(LNFLAGS) fromdos.1 todos.1)
 
 save:
 	$(ZIP) $(ZIPSRCFLAGS) $(ZIPSRCNAME) *
-- 
1.5.6.4