Browse Source

subdirs

master
Olaf Rempel 13 years ago
parent
commit
be2726a22f
22 changed files with 43 additions and 24 deletions
  1. +9
    -15
      Makefile
  2. +9
    -9
      hlswmaster.conf
  3. +0
    -0
      include/configfile.h
  4. +0
    -0
      include/event.h
  5. +0
    -0
      include/gamelist.h
  6. +0
    -0
      include/list.h
  7. +0
    -0
      include/logging.h
  8. +0
    -0
      include/netpkt.h
  9. +0
    -0
      include/plugin.h
  10. +0
    -0
      include/plugin_helper.h
  11. +0
    -0
      include/scanner.h
  12. +0
    -0
      include/server.h
  13. +3
    -0
      plugins/.gitignore
  14. +22
    -0
      plugins/Makefile
  15. +0
    -0
      plugins/d3engine.c
  16. +0
    -0
      plugins/gamespy1.c
  17. +0
    -0
      plugins/gamespy2.c
  18. +0
    -0
      plugins/halflife.c
  19. +0
    -0
      plugins/hlswproxy.c
  20. +0
    -0
      plugins/q3engine.c
  21. +0
    -0
      plugins/quake2.c
  22. +0
    -0
      plugins/ut2k4.c

+ 9
- 15
Makefile View File

@@ -1,35 +1,29 @@
VERSION := v2.00

CFLAGS := -O2 -pipe -Wall -DVERSION='"$(VERSION)"'
CFLAGS := -O2 -pipe -Wall -Iinclude -DVERSION='"$(VERSION)"'
LDFLAGS := -ldl -rdynamic

HLSWMASTER_SRC := configfile.o event.o gamelist.o hlswmaster.o logging.o \
netpkt.o plugin.o plugin_helper.o scanner.o server.o
PLUGINS := $(wildcard p_*.c)
OBJS := configfile.o event.o gamelist.o logging.o netpkt.o plugin.o \
plugin_helper.o scanner.o server.o

all: hlswmaster masterquery $(PLUGINS:.c=.so)
all: hlswmaster masterquery
make -C plugins all

hlswmaster: $(HLSWMASTER_SRC)
hlswmaster: $(OBJS) hlswmaster.o
$(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@

masterquery: masterquery.o
$(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@
$(CC) $(CFLAGS) $^ -o $@

%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@

%.so: %_sh.o
$(LD) -shared -o $@ $<

%_sh.o: %.c
$(CC) $(CFLAGS) -fPIC -c $< -o $@

%.d: %.c
$(CC) $(CFLAGS) -MM -c $< -o $@

clean:
rm -f hlswmaster masterquery *.so *.d *.o *.log
rm -f hlswmaster masterquery *.d *.o *.log
make -C plugins clean

DEPS := $(wildcard *.c)
-include $(DEPS:.c=.d)

+ 9
- 9
hlswmaster.conf View File

@@ -14,15 +14,15 @@
## master answers with this source IP
#master_src 0.0.0.0:7140

#plugin_dir .
plugin p_d3engine.so
plugin p_gamespy1.so
plugin p_gamespy2.so
plugin p_halflife.so
plugin p_hlswproxy.so
plugin p_q3engine.so
plugin p_quake2.so
plugin p_ut2k4.so
plugin_dir plugins
plugin d3engine.so
plugin gamespy1.so
plugin gamespy2.so
plugin halflife.so
plugin hlswproxy.so
plugin q3engine.so
plugin quake2.so
plugin ut2k4.so

## logging
#logfile hlswmaster.log


configfile.h → include/configfile.h View File


event.h → include/event.h View File


gamelist.h → include/gamelist.h View File


list.h → include/list.h View File


logging.h → include/logging.h View File


netpkt.h → include/netpkt.h View File


plugin.h → include/plugin.h View File


plugin_helper.h → include/plugin_helper.h View File


scanner.h → include/scanner.h View File


server.h → include/server.h View File


+ 3
- 0
plugins/.gitignore View File

@@ -0,0 +1,3 @@
*.o
*.so
*.d

+ 22
- 0
plugins/Makefile View File

@@ -0,0 +1,22 @@
PLUGINS := $(wildcard *.c)
CFLAGS := -O2 -pipe -Wall -I../include

all: $(PLUGINS:.c=.so)

%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@

%.so: %_sh.o
$(LD) -shared -o $@ $<

%_sh.o: %.c
$(CC) $(CFLAGS) -fPIC -c $< -o $@

%.d: %.c
$(CC) $(CFLAGS) -MM -c $< -o $@

clean:
rm -f *.so *.d *.o

DEPS := $(wildcard *.c)
-include $(DEPS:.c=.d)

p_d3engine.c → plugins/d3engine.c View File


p_gamespy1.c → plugins/gamespy1.c View File


p_gamespy2.c → plugins/gamespy2.c View File


p_halflife.c → plugins/halflife.c View File


p_hlswproxy.c → plugins/hlswproxy.c View File


p_q3engine.c → plugins/q3engine.c View File


p_quake2.c → plugins/quake2.c View File


p_ut2k4.c → plugins/ut2k4.c View File


Loading…
Cancel
Save