r1ch.net forums
* Home Help Search Login Register
r1ch.net  |  General  |  General Discussion  |  Topic: Pissed off Bunny compile
Pages: [1]
Print
Author Topic: Pissed off Bunny compile  (Read 21919 times)
Rct. Tsoul
Member

Posts: 9



« on: April 30, 2011, 06:38:48 pm »

I downloaded the Pissed off Bunny mod source and there is no Makefile to compile it to my x86_64 system for linux, please provide makefile and and/or a new download all together.

If possible it would be good so that when a client connect to a Linux server, it will auto download the game86.dll and Bunny model to them so they wont have to install anything.
Logged
QwazyWabbit
Member

Posts: 402


« Reply #1 on: May 01, 2011, 02:01:22 am »

Such a nice grateful post for a FREE mod that's 11 years old, gee no linux makefile for a project that was based on Win32. Duh.

Downloading of the DLL is not necessary for clients.
Downloading of the DLL from a game server to a client would be a SERIOUS security risk and a stupid idea.

Since you are a grateful Linux user and want/need a makefile, here's a start:


Code:
#
# Quake2 Pissed off Bunny mod Makefile for Linux and OS X
#
# Modified May 5 2011 by QwazyWabbit <wabbit@clanwos.org>
#
# This makefile should reside with the sources.
# To build the complete project simply type:
# make clean
# make depends
# make
#
# Adding or changing components becomes a process of simply editing
# the GAME_OBJS list and repeating the 'make depends' command to
# update the dependencies.
#
# Requires GNU make.
#
# This builds the gamei386.so for Linux and OS X based on the
# Pissed off Bunny mod by Richard Stanaway (r1ch)
#

ARCH=i386

#use these cflags to optimize it
CFLAGS=-O3 -Wall
#use these when debugging
#CFLAGS=-g

# flavors of Linux
ifeq ($(shell uname),Linux)
#SVNDEV := -D'SVN_REV="$(shell svnversion -n .)"'
#CFLAGS += $(SVNDEV)
CFLAGS += -DLINUX
LIBTOOL = ldd
endif

# OS X wants to be Linux and FreeBSD too.
ifeq ($(shell uname),Darwin)
#SVNDEV := -D'SVN_REV="$(shell svnversion -n .)"'
#CFLAGS += $(SVNDEV)
CFLAGS += -DLINUX
LIBTOOL = otool
endif

LDFLAGS=-ldl -lm -shared -o
SHLIBEXT=so
SHLIBCFLAGS=-fPIC
SHLIBLDFLAGS=-shared

DO_CC=$(CC) $(CFLAGS) $(SHLIBCFLAGS) -o $@ -c $<

#############################################################################
# SETUP AND BUILD GAME
#############################################################################

.c.o:
$(DO_CC)

GAME_OBJS = \
g_ai.o g_chase.o g_cmds.o g_combat.o g_func.o g_items.o \
g_main.o g_misc.o g_monster.o g_phys.o g_save.o \
g_spawn.o g_svcmds.o g_target.o g_trigger.o g_turret.o \
g_utils.o g_weapon.o m_actor.o m_berserk.o m_boss2.o \
m_boss3.o m_boss31.o m_boss32.o m_brain.o m_chick.o \
m_flash.o m_flipper.o m_float.o m_flyer.o m_gladiator.o \
m_gunner.o m_hover.o m_infantry.o m_insane.o m_medic.o \
m_move.o m_mutant.o m_parasite.o m_soldier.o m_supertank.o \
m_tank.o p_client.o p_hud.o p_trail.o p_view.o \
p_weapon.o q_devels.o q_shared.o

game$(ARCH).$(SHLIBEXT): $(GAME_OBJS)
$(CC) $(LDFLAGS) $@ $(GAME_OBJS)
cp $@ ~/quake2/bunny/$@
$(LIBTOOL) -r $@


#############################################################################
# MISC
#############################################################################

clean:
rm -f $(GAME_OBJS)

# output dependencies to console
depend:
$(CC) -MM $(GAME_OBJS:.o=.c)

# output dependencies to file
depends:
$(CC) $(CFLAGS) -MM $(GAME_OBJS:.o=.c) > dependencies

$*.o: $*.c
$(CC) $(CFLAGS) -c $*.c

$*.c: $(ORIGDIR)/$*.c
tr -d '\015' < $(ORIGDIR)/$*.c > $*.c

$*.h: $(ORIGDIR)/$*.h
tr -d '\015' < $(ORIGDIR)/$*.h > $*.h

# use dependencies file during build
-include dependencies

#############################################################################
# EOF
#############################################################################
« Last Edit: May 05, 2011, 08:13:38 pm by QwazyWabbit » Logged
Rct. Tsoul
Member

Posts: 9



« Reply #2 on: May 01, 2011, 12:53:33 pm »

 cry
Thanks for the help, but I got the following:
Code:
[quake2@gserver bunny-src]$ make
make: svnversion: Command not found
gcc -O3 -Wall -D'SVN_REV=""' -DBUNNY -DLINUX -fPIC -o g_ai.o -c g_ai.c
g_ai.c: In function 'ai_checkattack':
g_ai.c:767: warning: suggest explicit braces to avoid ambiguous 'else'
gcc -O3 -Wall -D'SVN_REV=""' -DBUNNY -DLINUX -fPIC -o g_chase.o -c g_chase.c
gcc -O3 -Wall -D'SVN_REV=""' -DBUNNY -DLINUX -fPIC -o g_cmds.o -c g_cmds.c
g_cmds.c:6: warning: type qualifiers ignored on function return type
g_cmds.c: In function 'ClientTeam':
g_cmds.c:10: warning: suggest explicit braces to avoid ambiguous 'else'
gcc -O3 -Wall -D'SVN_REV=""' -DBUNNY -DLINUX -fPIC -o g_combat.o -c g_combat.c
g_combat.c: In function 'T_Damage':
g_combat.c:157: warning: 'index' may be used uninitialized in this function
gcc -O3 -Wall -D'SVN_REV=""' -DBUNNY -DLINUX -fPIC -o g_func.o -c g_func.c
gcc -O3 -Wall -D'SVN_REV=""' -DBUNNY -DLINUX -fPIC -o g_items.o -c g_items.c
g_items.c:24: error: static declaration of 'jacket_armor_index' follows non-static declaration
g_local.h:443: error: previous declaration of 'jacket_armor_index' was here
g_items.c:25: error: static declaration of 'combat_armor_index' follows non-static declaration
g_local.h:444: error: previous declaration of 'combat_armor_index' was here
g_items.c:26: error: static declaration of 'body_armor_index' follows non-static declaration
g_local.h:445: error: previous declaration of 'body_armor_index' was here
make: *** [g_items.o] Error 1
If you can or have the complete set for compileing on Linux, please post it here.
« Last Edit: May 01, 2011, 12:57:33 pm by Rct. Tsoul » Logged
QwazyWabbit
Member

Posts: 402


« Reply #3 on: May 02, 2011, 12:40:05 am »

It's very old code and has some errors due to its legacy, this will take some time.
Logged
Rct. Tsoul
Member

Posts: 9



« Reply #4 on: May 02, 2011, 06:16:29 pm »

Thanks man, dont rush as I dont think many people will play it, but once it is going I will host a 64bit server of it, I liked this mod as it was a refreshing change from others.
Logged
QwazyWabbit
Member

Posts: 402


« Reply #5 on: May 03, 2011, 07:21:39 pm »

Here's a revised version. Compiles correctly on Linux and OS X.

* bunny.zip (341.9 KB - downloaded 469 times.)
« Last Edit: May 05, 2011, 08:09:13 pm by QwazyWabbit » Logged
Pages: [1]
Print
r1ch.net  |  General  |  General Discussion  |  Topic: Pissed off Bunny compile
Jump to:  

Powered by SMF 1.1.19 | SMF © 2013, Simple Machines