Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:lafenghu
dynamips
dynamips-0.2.8-RC3-make.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File dynamips-0.2.8-RC3-make.patch of Package dynamips
Index: dynamips-0.2.8-RC3/Makefile =================================================================== --- dynamips-0.2.8-RC3.orig/Makefile +++ dynamips-0.2.8-RC3/Makefile @@ -5,11 +5,28 @@ # - Use "amd64" for a build on x86_64 (64-bits) # - Use "ppc32" for a build on powerpc (32-bits) # - Use "nojit" for unsupported architectures. -export DYNAMIPS_ARCH?=x86 - -# Do you want to use lib (for 32 bit compiling) or lib64 -export DYNAMIPS_LIB?=lib -#export DYNAMIPS_LIB?=lib64 +ifeq ($(shell uname -m),i*86) +DYNAMIPS_ARCH?=x86 +else +ifeq ($(shell uname -m),x86_64) +DYNAMIPS_ARCH?=amd64 +else +DYNAMIPS_ARCH?=nojit +endif +endif + +ifeq ($(shell uname -m),x86_64) +DYNAMIPS_LIB?=lib64 +LIBDIR?=/usr/lib64 +else +ifeq ($(shell uname -m),ppc64) +DYNAMIPS_LIB?=lib64 +LIBDIR?=/usr/lib64 +else +DYNAMIPS_LIB?=lib +LIBDIR?=/usr/lib +endif +endif # For MAC x64 you can compile the "unstable" version, which should work # fine, or use stable if you prefer. @@ -33,8 +50,6 @@ export VERSION_TRAIN=0.2.8 export VERSION_SUB=-RC3 # Executable binary extension -export DESTDIR?=/usr -export BIN_EXT?= .PHONY: all dynamips.stable dynamips.unstable @@ -50,13 +65,13 @@ dynamips.unstable: install: dynamips.$(DYNAMIPS_CODE) @echo "Installing" - install -d $(DESTDIR)/bin $(DESTDIR)/man/man1 $(DESTDIR)/man/man7 $(DESTDIR)/etc + install -d $(DESTDIR)/usr/bin $(DESTDIR)/usr/share/man/man1 $(DESTDIR)/usr/share/man/man7 $(DESTDIR)/etc cp dynamips.$(DYNAMIPS_CODE) dynamips - install dynamips $(DYNAMIPS_CODE)/nvram_export $(DESTDIR)/bin/ + install dynamips $(DYNAMIPS_CODE)/nvram_export $(DESTDIR)/usr/bin/ rm -f dynamips - install -m644 dynamips.1 $(DESTDIR)/man/man1 - install -m644 nvram_export.1 $(DESTDIR)/man/man1 - install -m644 hypervisor_mode.7 $(DESTDIR)/man/man7 + install -m644 dynamips.1 $(DESTDIR)/usr/share/man/man1 + install -m644 nvram_export.1 $(DESTDIR)/usr/share/man/man1 + install -m644 hypervisor_mode.7 $(DESTDIR)/usr/share/man/man7 .PHONY: clean Index: dynamips-0.2.8-RC3/stable/Makefile =================================================================== --- dynamips-0.2.8-RC3.orig/stable/Makefile +++ dynamips-0.2.8-RC3/stable/Makefile @@ -3,15 +3,28 @@ # Replace x86 by amd64 for a build on x86_64. # Use "nojit" for architectures that are not x86 or x86_64. +ifeq ($(shell uname -m),i*86) DYNAMIPS_ARCH?=x86 -#DYNAMIPS_ARCH?=amd64 - -ifeq ($(DYNAMIPS_ARCH),ppc32) -DYNAMIPS_ARCH=x86 +else +ifeq ($(shell uname -m),x86_64) +DYNAMIPS_ARCH?=amd64 +else +DYNAMIPS_ARCH?=nojit +endif endif -# Do you want to use lib (for 32 bit compiling) or lib64 +ifeq ($(shell uname -m),x86_64) +DYNAMIPS_LIB?=lib64 +LIBDIR?=/usr/lib64 +else +ifeq ($(shell uname -m),ppc64) +DYNAMIPS_LIB?=lib64 +LIBDIR?=/usr/lib64 +else DYNAMIPS_LIB?=lib +LIBDIR?=/usr/lib +endif +endif # Get include files from the current directory and from the common directory @@ -38,8 +51,6 @@ VERSION_DEV=$(VERSION_TRAIN)-$(shell dat VPATH = ../common # Executable binary extension -DESTDIR?=/usr -BIN_EXT?= CC?=gcc LD=ld @@ -51,7 +62,7 @@ MIPS64_ARCH_INC_FILE=\"mips64_$(DYNAMIPS PPC32_ARCH_INC_FILE=\"ppc32_$(DYNAMIPS_ARCH)_trans.h\" OSNAME=unknown -CFLAGS+= $(INCLUDE) -Wall -O3 -fomit-frame-pointer \ +CFLAGS+= $(INCLUDE) -Wall -fomit-frame-pointer \ -DJIT_ARCH=\"$(DYNAMIPS_ARCH)\" -DJIT_CPU=CPU_$(DYNAMIPS_ARCH) \ -DMIPS64_ARCH_INC_FILE=$(MIPS64_ARCH_INC_FILE) \ -DPPC32_ARCH_INC_FILE=$(PPC32_ARCH_INC_FILE) \ @@ -73,11 +84,11 @@ ifeq ($(shell uname), FreeBSD) else ifeq ($(shell uname), Linux) PTHREAD_LIBS?=-lpthread -# PCAP_LIB=-lpcap + PCAP_LIB=-lpcap OSNAME=Linux CFLAGS+=-I/usr/include -I. $(PTHREAD_CFLAGS) - LIBS=-L/usr/lib -L. -ldl -luuid /usr/$(DYNAMIPS_LIB)/libelf.a $(PTHREAD_LIBS) - DESTDIR=/usr + LIBS=-L/$(LIBDIR) -L. -ldl -luuid -lelf $(PTHREAD_LIBS) +# DESTDIR=/usr else ifeq ($(shell uname -s), Darwin) OSNAME=Darwin @@ -103,7 +114,7 @@ ifeq ($(shell uname -o), Cygwin) PCAP_LIB=-lpacket -lwpcap else CFLAGS+=-I/usr/include/libelf -D_FILE_OFFSET_BITS=64 - LIBS=-L. -ldl /usr/lib/libelf.a -lpthread + LIBS=-L. -ldl $(LIBDIR)/libelf.a -lpthread endif endif endif @@ -247,29 +258,29 @@ all: $(PROG) nvram_export $(PROG): mips64_microcode_dump.inc ppc32_microcode_dump.inc \ $(LEX_C) $(C_OBJS) $(A_OBJS) @echo "Linking $@" - @$(CC) $(CFLAGS) -o $@ $(C_OBJS) $(A_OBJS) $(LIBS) + $(CC) $(CFLAGS) -o $@ $(C_OBJS) $(A_OBJS) $(LIBS) udp_send$(BIN_EXT): udp_send.c net.c crc.c @echo "Linking $@" - @$(CC) -Wall $(CFLAGS) -o $@ udp_send.c net.c crc.c $(LIBS) + $(CC) -Wall $(CFLAGS) -o $@ udp_send.c net.c crc.c $(LIBS) udp_recv$(BIN_EXT): udp_recv.c net.c crc.c @echo "Linking $@" - @$(CC) -Wall $(CFLAGS) -o $@ udp_recv.c net.c crc.c $(LIBS) + $(CC) -Wall $(CFLAGS) -o $@ udp_recv.c net.c crc.c $(LIBS) rom2c$(BIN_EXT): rom2c.c @echo "Linking $@" - @$(CC) -Wall $(CFLAGS) -o $@ $< $(LIBS) + $(CC) -Wall $(CFLAGS) -o $@ $< $(LIBS) mips64_microcode_dump.inc: rom2c$(BIN_EXT) mips64_microcode - @./rom2c mips64_microcode mips64_microcode_dump.inc 0xbfc00000 + ./rom2c mips64_microcode mips64_microcode_dump.inc 0xbfc00000 ppc32_microcode_dump.inc: rom2c$(BIN_EXT) ppc32_microcode - @./rom2c ppc32_microcode ppc32_microcode_dump.inc 0xfff00000 + ./rom2c ppc32_microcode ppc32_microcode_dump.inc 0xfff00000 asmdefs$(BIN_EXT): asmdefs.c mips64.h @echo "Linking $@" - @$(CC) -Wall $(CFLAGS) -o $@ asmdefs.c + $(CC) -Wall $(CFLAGS) -o $@ asmdefs.c asmdefs.h: asmdefs$(BIN_EXT) @echo "Building assembly definitions header file" @@ -281,11 +292,11 @@ nvram_export$(BIN_EXT): nvram_export.c install: $(PROG) nvram_export @echo "Installing" - install -d $(DESTDIR)/bin $(DESTDIR)/man/man1 $(DESTDIR)/man/man7 $(DESTDIR)/etc - install dynamips nvram_export $(DESTDIR)/bin - install -m644 dynamips.1 $(DESTDIR)/man/man1 - install -m644 nvram_export.1 $(DESTDIR)/man/man1 - install -m644 hypervisor_mode.7 $(DESTDIR)/man/man7 + install -d $(DESTDIR)/usr/bin $(DESTDIR)/usr/share/man/man1 $(DESTDIR)/usr/shareman/man7 $(DESTDIR)/etc + install dynamips nvram_export $(DESTDIR)/usr/bin + install -m644 dynamips.1 $(DESTDIR)/usr/share/man/man1 + install -m644 nvram_export.1 $(DESTDIR)/usr/share/man/man1 + install -m644 hypervisor_mode.7 $(DESTDIR)/usr/share/man/man7 # install -m644 example $(DESTDIR)/etc/dynamips @@ -312,11 +323,11 @@ packdev: .S.o: @echo "Assembling $<" - @$(CC) $(CFLAGS) $(INCLUDE) -c -o $*.o $< + $(CC) $(CFLAGS) $(INCLUDE) -c -o $*.o $< .c.o: @echo "Compiling $<" - @$(CC) $(CFLAGS) $(INCLUDE) -c -o $*.o $< + $(CC) $(CFLAGS) $(INCLUDE) -c -o $*.o $< .l.c: $(LEX) -o$*.c $<
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor