File: build

package info (click to toggle)
spim 8.0%2Bdfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,736 kB
  • sloc: asm: 8,560; ansic: 8,437; yacc: 2,298; makefile: 1,107; lex: 706; sh: 219
file content (53 lines) | stat: -rw-r--r-- 1,943 bytes parent folder | download | duplicates (4)
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
This patch changes the build logic of the package by generating a top-level
Makefile and introducing alternate variables for Makefile setup.
Index: spim-8.0.dfsg/Makefile
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ spim-8.0.dfsg/Makefile	2013-11-08 14:07:59.000000000 +0100
@@ -0,0 +1,9 @@
+MAKE += CC="$(CC) -Wl,--as-needed" CDEBFLAGS="$(CFLAGS)" EXCEPTION_DIR=/usr/lib/spim
+build:
+	cd spim && $(MAKE) spim
+	cd xspim && xmkmf && $(MAKE) xspim
+clean:
+	cd spim && $(MAKE) very-clean
+	cd xspim && { [ ! -f Makefile ] || $(MAKE) distclean; }
+	rm -f Tests/tt.endian.s Tests/tt.s
+.PHONY: build clean
Index: spim-8.0.dfsg/spim/Makefile
===================================================================
--- spim-8.0.dfsg.orig/spim/Makefile	2013-11-08 14:07:59.000000000 +0100
+++ spim-8.0.dfsg/spim/Makefile	2013-11-08 14:07:59.000000000 +0100
@@ -105,10 +105,10 @@
 DEFINES = $(ENDIAN) $(MEM_SIZES) -DDEFAULT_EXCEPTION_HANDLER="\"$(EXCEPTION_DIR)/exceptions.s\"" -DSPIM_VERSION="\"`cat ../VERSION`\""
 
 CC = gcc
-CFLAGS = -I. -I$(CPU_DIR) $(DEFINES) -g -Wall
+CFLAGS = -I. -I$(CPU_DIR) $(DEFINES) $(CDEBFLAGS)
 YFLAGS = -d --file-prefix=y
 YCFLAGS =
-LDFLAGS = -lm
+LDFLAGS += -lm
 CSH = bash
 
 # lex.yy.c is usually compiled with -O to speed it up.
Index: spim-8.0.dfsg/xspim/Imakefile
===================================================================
--- spim-8.0.dfsg.orig/xspim/Imakefile	2010-01-09 06:22:58.000000000 +0100
+++ spim-8.0.dfsg/xspim/Imakefile	2013-11-08 14:09:28.000000000 +0100
@@ -101,13 +101,13 @@
 DEPLIBS = XawClientDepLibs
 LOCALLIBS = XawClientLibs
 
-CDEBUGFLAGS = -g
+CDEBUGFLAGS = -g $(CPPFLAGS)
 
 INCLUDES = -I. -I$(CPU_DIR)
 
 DEFINES = $(ENDIAN) $(MEM_SIZES) -DDEFAULT_EXCEPTION_HANDLER="\"$(EXCEPTION_DIR)/exceptions.s\"" -DSPIM_VERSION="\"`cat ../VERSION`\""
 
-SYS_LIBRARIES = -lm
+SYS_LIBRARIES = -lm $(LDFLAGS)
 
 #