]> git.pld-linux.org Git - packages/dynamips.git/blame - dynamips-Makefile.patch
- use make install, fix installation paths in Makefile
[packages/dynamips.git] / dynamips-Makefile.patch
CommitLineData
23f75273 1--- Makefile 2007-05-26 11:52:33.000000000 +0200
946c8449 2+++ dynamips-0.2.7/Makefile 2007-09-11 21:59:47.013372947 +0200
3@@ -19,8 +19,14 @@
4 VERSION=$(VERSION_TRAIN)$(VERSION_SUB)
5 VERSION_DEV=$(VERSION_TRAIN)-$(shell date +%Y%m%d-%H)
6
7+DESTDIR=
8+PREFIX=/usr/local
9+BINDIR=$(PREFIX)/bin
10+DATADIR=$(PREFIX)/share
11+MANDIR=$(DATADIR)/man
12+SYSCONFIGDIR=$(PREFIX)/etc
13+
14 # Executable binary extension
15-DESTDIR?=/usr
16 BIN_EXT?=
17
18 CC?=gcc
19@@ -32,7 +38,7 @@
23f75273 20 MIPS64_ARCH_INC_FILE=\"mips64_$(DYNAMIPS_ARCH)_trans.h\"
21 PPC32_ARCH_INC_FILE=\"ppc32_$(DYNAMIPS_ARCH)_trans.h\"
5ee2ba72 22
23f75273 23-CFLAGS+=-g -Wall -O3 -fomit-frame-pointer \
24+CFLAGS+= $(RPM_CFLAGS) -fomit-frame-pointer \
25 -DJIT_ARCH=\"$(DYNAMIPS_ARCH)\" -DJIT_CPU=CPU_$(DYNAMIPS_ARCH) \
26 -DMIPS64_ARCH_INC_FILE=$(MIPS64_ARCH_INC_FILE) \
27 -DPPC32_ARCH_INC_FILE=$(PPC32_ARCH_INC_FILE) \
946c8449 28@@ -51,10 +57,9 @@
23f75273 29 else
30 ifeq ($(shell uname), Linux)
31 PTHREAD_LIBS?=-lpthread
32-# PCAP_LIB=-lpcap
33- CFLAGS+=-I/usr/include -I. $(PTHREAD_CFLAGS)
34- LIBS=-L/usr/lib -L. /usr/lib/libelf.a $(PTHREAD_LIBS)
946c8449 35- DESTDIR=/usr
23f75273 36+ PCAP_LIB=-lpcap
37+ CFLAGS+=-I. $(PTHREAD_CFLAGS)
38+ LIBS=-L. -lelf $(PTHREAD_LIBS)
5ee2ba72 39 else
23f75273 40 ifeq ($(shell uname -s), Darwin)
946c8449 41 CFLAGS+=-I/usr/local/include -mdynamic-no-pic -D_FILE_OFFSET_BITS=64
42@@ -201,15 +206,15 @@
23f75273 43 $(PROG): mips64_microcode_dump.inc ppc32_microcode_dump.inc \
44 $(LEX_C) $(C_OBJS) $(A_OBJS)
45 @echo "Linking $@"
46- @$(CC) -o $@ $(C_OBJS) $(A_OBJS) $(LIBS)
47+ $(CC) -o $@ $(C_OBJS) $(A_OBJS) $(LIBS)
48
49 udp_send$(BIN_EXT): udp_send.c net.c
50 @echo "Linking $@"
51- @$(CC) -Wall $(CFLAGS) -o $@ udp_send.c net.c $(LIBS)
52+ $(CC) -Wall $(CFLAGS) -o $@ udp_send.c net.c $(LIBS)
53
54 rom2c$(BIN_EXT): rom2c.c
55 @echo "Linking $@"
56- @$(CC) -Wall $(CFLAGS) -o $@ rom2c.c $(LIBS)
57+ $(CC) -Wall $(CFLAGS) -o $@ rom2c.c $(LIBS)
58
59 mips64_microcode_dump.inc: rom2c$(BIN_EXT) mips64_microcode
60 @./rom2c mips64_microcode mips64_microcode_dump.inc 0xbfc00000
946c8449 61@@ -219,7 +224,7 @@
23f75273 62
63 asmdefs$(BIN_EXT): asmdefs.c mips64.h
64 @echo "Linking $@"
65- @$(CC) -Wall $(CFLAGS) -o $@ asmdefs.c
66+ $(CC) -Wall $(CFLAGS) -o $@ asmdefs.c
67
68 asmdefs.h: asmdefs$(BIN_EXT)
69 @echo "Building assembly definitions header file"
946c8449 70@@ -227,15 +232,15 @@
23f75273 71
72 nvram_export$(BIN_EXT): nvram_export.c
73 @echo "Linking $@"
74- @$(CC) -Wall $(CFLAGS) -o $@ nvram_export.c
75+ $(CC) -Wall $(CFLAGS) -o $@ nvram_export.c
76
77 install: $(PROG) nvram_export
78 @echo "Installing"
946c8449 79- install -d $(DESTDIR)/bin $(DESTDIR)/man/man1 $(DESTDIR)/man/man7 $(DESTDIR)/etc
80- install dynamips nvram_export $(DESTDIR)/bin
81- install -m644 dynamips.1 $(DESTDIR)/man/man1
82- install -m644 nvram_export.1 $(DESTDIR)/man/man1
83- install -m644 hypervisor_mode.7 $(DESTDIR)/man/man7
84+ install -d $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1 $(DESTDIR)$(MANDIR)/man7 $(DESTDIR)$(SYSCONFIGDIR)/etc
85+ install dynamips nvram_export $(DESTDIR)$(BINDIR)
86+ install -m644 dynamips.1 $(DESTDIR)$(MANDIR)/man1
87+ install -m644 nvram_export.1 $(DESTDIR)$(MANDIR)/man1
88+ install -m644 hypervisor_mode.7 $(DESTDIR)$(MANDIR)/man7
89 # install -m644 example $(DESTDIR)/etc/dynamips
90
91
92@@ -261,11 +266,11 @@
23f75273 93
94 .S.o:
95 @echo "Assembling $<"
96- @$(CC) $(CFLAGS) $(INCLUDE) -c -o $*.o $<
97+ $(CC) $(CFLAGS) $(INCLUDE) -c -o $*.o $<
98
99 .c.o:
100 @echo "Compiling $<"
101- @$(CC) $(CFLAGS) $(INCLUDE) -c -o $*.o $<
102+ $(CC) $(CFLAGS) $(INCLUDE) -c -o $*.o $<
103
104 .l.c:
105 $(LEX) -o$*.c $<
This page took 0.185271 seconds and 4 git commands to generate.