mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
move the getopt files from qfcc/source to libs/util, link qw-master against
libQFutil and enable the option parsting in qw-master for win32.
This commit is contained in:
parent
799cfa58af
commit
b4000200e3
9 changed files with 9 additions and 12 deletions
|
@ -3,7 +3,7 @@ AUTOMAKE_OPTIONS= foreign
|
|||
SUBDIRS = QF
|
||||
EXTRA_DIST = asm_i386.h adivtab.h anorm_dots.h anorms.h asm_draw.h block16.h \
|
||||
block8.h buildnum.h compat.h context_x11.h d_iface.h d_ifacea.h \
|
||||
d_local.h dga_check.h fbset.h gl_warp_sin.h \
|
||||
d_local.h dga_check.h fbset.h getopt.h gl_warp_sin.h \
|
||||
in_win.h logos.h menu.h old_keys.h qstring.h quakeasm.h r_cvar.h \
|
||||
r_dynamic.h r_local.h r_shared.h sbar.h skin_stencil.h stamp-h.in \
|
||||
varrays.h vgamodes.h view.h vregset.h winquake.h world.h \
|
||||
|
|
|
@ -26,7 +26,7 @@ libQFutil_la_LDFLAGS= -version-info 1:0:0
|
|||
libQFutil_la_LIBADD= libasm.la $(Z_LIBS) $(DL_LIBS)
|
||||
libQFutil_la_DEPENDENCIES= libasm.la
|
||||
libQFutil_la_SOURCES= \
|
||||
checksum.c cmd.c crc.c cvar.c fendian.c hash.c \
|
||||
checksum.c cmd.c crc.c cvar.c fendian.c getopt.c getopt1.c hash.c \
|
||||
info.c link.c mathlib.c mdfour.c msg.c pcx.c plugin.c qargs.c \
|
||||
qendian.c qfplist.c quakefs.c quakeio.c sizebuf.c string.c sys.c \
|
||||
tga.c va.c ver_check.c wad.c zone.c $(fnmatch)
|
||||
|
|
|
@ -95,8 +95,8 @@ qw_server_LDFLAGS= $(common_ldflags)
|
|||
qw_server_DEPENDENCIES= libqfnet.la libasm.la $(qf_server_LIBS)
|
||||
|
||||
qw_master_SOURCES= master.c
|
||||
qw_master_LDADD= $(NET_LIBS)
|
||||
qw_master_LDFLAGS= $(common_ldflags)
|
||||
qw_master_LDADD= $(top_builddir)/libs/util/libQFutil.la $(NET_LIBS)
|
||||
qw_master_LDFLAGS= $(common_ldflags) -static
|
||||
|
||||
cl_plugin_LIBS= \
|
||||
$(CLIENT_PLUGIN_STATIC_LIBS) \
|
||||
|
|
|
@ -59,6 +59,7 @@ static const char rcsid[] =
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <getopt.h>
|
||||
|
||||
#include "protocol.h"
|
||||
|
||||
|
@ -337,7 +338,6 @@ make_host_addr (const char *host, int port, struct sockaddr_in *host_addr)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifndef WIN32
|
||||
static void
|
||||
read_hosts (const char *fname)
|
||||
{
|
||||
|
@ -372,19 +372,16 @@ read_hosts (const char *fname)
|
|||
}
|
||||
fclose (host_file);
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
struct sockaddr_in addr;
|
||||
short port = htons (PORT_MASTER);
|
||||
#ifndef WIN32 //FIXME
|
||||
int c;
|
||||
#endif
|
||||
|
||||
servers = calloc (sizeof (server_t), serverlen);
|
||||
#ifndef WIN32 //FIXME
|
||||
|
||||
while ((c = getopt (argc, argv, "p:f:")) != -1) {
|
||||
switch (c) {
|
||||
case 'p':
|
||||
|
@ -395,7 +392,7 @@ main (int argc, char **argv)
|
|||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
addr.sin_family = AF_INET;
|
||||
addr.sin_addr.s_addr = INADDR_ANY;
|
||||
addr.sin_port = port;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
AUTOMAKE_OPTIONS= foreign
|
||||
|
||||
EXTRA_DIST= cmdlib.h config.h.in expr.h getopt.h scope.h struct.h switch.h \
|
||||
EXTRA_DIST= cmdlib.h config.h.in expr.h scope.h struct.h switch.h \
|
||||
qfcc.h type.h
|
||||
|
|
|
@ -37,7 +37,7 @@ YFLAGS = -d
|
|||
|
||||
bin_PROGRAMS= qfcc
|
||||
|
||||
qfcc_SOURCES= cmdlib.c debug.c pr_comp.c pr_def.c pr_imm.c pr_lex.c pr_opcode.c qfcc.c qc-parse.y qc-lex.l emit.c expr.c struct.c switch.c getopt.c getopt1.c type.c
|
||||
qfcc_SOURCES= cmdlib.c debug.c pr_comp.c pr_def.c pr_imm.c pr_lex.c pr_opcode.c qfcc.c qc-parse.y qc-lex.l emit.c expr.c struct.c switch.c type.c
|
||||
qfcc_LDADD= $(QFCC_LIBS)
|
||||
qfcc_DEPENDENCIES= $(QFCC_DEPS)
|
||||
EXTRA_DIST= qc-parse.h
|
||||
|
|
Loading…
Reference in a new issue