added some makefiles

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1023 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2005-05-17 22:05:45 +00:00
parent 7ffd69e832
commit 8e0c688b58
6 changed files with 54 additions and 6 deletions

14
plugins/Makefile Normal file
View file

@ -0,0 +1,14 @@
all: hud irc
.PHONY: all hud irc
help:
@-echo make a subdirectory
hud:
$(MAKE) -C hud
irc:
$(MAKE) 0C irc

16
plugins/hud/Makefile Normal file
View file

@ -0,0 +1,16 @@
DO_CC=$(CC) -ggdb -fPIC -Wall $(CFLAGS) -o $@ -c $<
OBJECTS=ui_sbar.o plugin.o qvm_api.o
HEADERS=../plugin.h
all: $(OBJECTS)
$(CC) -ggdb -fPIC -shared $(OBJECTS) -o ../../quake/qw/plugins/hudx86.so
ui_sbar.o: ui_sbar.c $(HEADERS)
$(DO_CC)
plugin.o: ../plugin.c $(HEADERS)
$(DO_CC)
qvm_api.o: ../qvm_api.c $(HEADERS)
$(DO_CC)

View file

@ -1170,3 +1170,4 @@ int Plug_Init(int *args)
}
return false;
}

16
plugins/irc/Makefile Normal file
View file

@ -0,0 +1,16 @@
DO_CC=$(CC) -fPIC $(CFLAGS) -o $@ -c $<
OBJECTS=ircclient.o plugin.o qvm_api.o
HEADERS=../plugin.h
all: $(OBJECTS)
gcc --shared -ldl $(OBJECTS) -o ../../quake/qw/plugins/ircx86.so
ircclient.o: ircclient.c $(HEADERS)
$(DO_CC)
plugin.o: ../plugin.c $(HEADERS)
$(DO_CC)
qvm_api.o: ../qvm_api.c $(HEADERS)
$(DO_CC)

View file

@ -31,7 +31,7 @@ int vmMain( int command, int arg0, int arg1, int arg2, int arg3, int arg4, int a
#ifndef Q3_VM
int (*syscall)( int arg, ... );
int (QDECL *syscall)( int arg, ... );
#endif
#define PASSFLOAT(f) *(int*)&(f)
@ -191,8 +191,9 @@ void Plug_InitStandardBuiltins(void)
}
#ifndef Q3_VM
void dllEntry( int (QDECL *syscallptr)( int arg,... ) ) {
syscall = syscallptr;
void dllEntry(int (QDECL *funcptr)(int,...))
{
syscall = funcptr;
}
#endif

View file

@ -82,7 +82,7 @@ retry:
tokens++;
break;
case 'c':
_int = va_arg(vargs, char);
_int = va_arg(vargs, int);
if (--maxlen < 0)
{*buffer++='\0';return tokens;}
*buffer++ = _int;
@ -136,7 +136,7 @@ retry:
tokens++;
break;
case 'f':
_float = va_arg(vargs, float);
_float = va_arg(vargs, double);
//integer part.
_int = (int)_float;