hlswmaster/Makefile
2006-11-24 21:53:25 +01:00

36 lines
715 B
Makefile

VERSION := v2.00
CFLAGS := -O2 -pipe -Wall -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)
all: hlswmaster masterquery $(PLUGINS:.c=.so)
hlswmaster: $(HLSWMASTER_SRC)
$(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@
masterquery: masterquery.o
$(CC) $(CFLAGS) $^ $(LDFLAGS) -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
DEPS := $(wildcard *.c)
-include $(DEPS:.c=.d)