subdirs
This commit is contained in:
parent
aee280ca5c
commit
be2726a22f
24
Makefile
24
Makefile
|
@ -1,35 +1,29 @@
|
||||||
VERSION := v2.00
|
VERSION := v2.00
|
||||||
|
|
||||||
CFLAGS := -O2 -pipe -Wall -DVERSION='"$(VERSION)"'
|
CFLAGS := -O2 -pipe -Wall -Iinclude -DVERSION='"$(VERSION)"'
|
||||||
LDFLAGS := -ldl -rdynamic
|
LDFLAGS := -ldl -rdynamic
|
||||||
|
|
||||||
HLSWMASTER_SRC := configfile.o event.o gamelist.o hlswmaster.o logging.o \
|
OBJS := configfile.o event.o gamelist.o logging.o netpkt.o plugin.o \
|
||||||
netpkt.o plugin.o plugin_helper.o scanner.o server.o
|
plugin_helper.o scanner.o server.o
|
||||||
|
|
||||||
PLUGINS := $(wildcard p_*.c)
|
|
||||||
|
|
||||||
all: hlswmaster masterquery $(PLUGINS:.c=.so)
|
all: hlswmaster masterquery
|
||||||
|
make -C plugins all
|
||||||
|
|
||||||
hlswmaster: $(HLSWMASTER_SRC)
|
hlswmaster: $(OBJS) hlswmaster.o
|
||||||
$(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@
|
$(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@
|
||||||
|
|
||||||
masterquery: masterquery.o
|
masterquery: masterquery.o
|
||||||
$(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@
|
$(CC) $(CFLAGS) $^ -o $@
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
$(CC) $(CFLAGS) -c $< -o $@
|
$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
%.so: %_sh.o
|
|
||||||
$(LD) -shared -o $@ $<
|
|
||||||
|
|
||||||
%_sh.o: %.c
|
|
||||||
$(CC) $(CFLAGS) -fPIC -c $< -o $@
|
|
||||||
|
|
||||||
%.d: %.c
|
%.d: %.c
|
||||||
$(CC) $(CFLAGS) -MM -c $< -o $@
|
$(CC) $(CFLAGS) -MM -c $< -o $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f hlswmaster masterquery *.so *.d *.o *.log
|
rm -f hlswmaster masterquery *.d *.o *.log
|
||||||
|
make -C plugins clean
|
||||||
|
|
||||||
DEPS := $(wildcard *.c)
|
DEPS := $(wildcard *.c)
|
||||||
-include $(DEPS:.c=.d)
|
-include $(DEPS:.c=.d)
|
||||||
|
|
|
@ -14,15 +14,15 @@
|
||||||
## master answers with this source IP
|
## master answers with this source IP
|
||||||
#master_src 0.0.0.0:7140
|
#master_src 0.0.0.0:7140
|
||||||
|
|
||||||
#plugin_dir .
|
plugin_dir plugins
|
||||||
plugin p_d3engine.so
|
plugin d3engine.so
|
||||||
plugin p_gamespy1.so
|
plugin gamespy1.so
|
||||||
plugin p_gamespy2.so
|
plugin gamespy2.so
|
||||||
plugin p_halflife.so
|
plugin halflife.so
|
||||||
plugin p_hlswproxy.so
|
plugin hlswproxy.so
|
||||||
plugin p_q3engine.so
|
plugin q3engine.so
|
||||||
plugin p_quake2.so
|
plugin quake2.so
|
||||||
plugin p_ut2k4.so
|
plugin ut2k4.so
|
||||||
|
|
||||||
## logging
|
## logging
|
||||||
#logfile hlswmaster.log
|
#logfile hlswmaster.log
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
*.o
|
||||||
|
*.so
|
||||||
|
*.d
|
|
@ -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)
|
Loading…
Reference in New Issue