hlswmaster/Makefile
2006-02-02 16:29:30 +01:00

29 lines
695 B
Makefile

# Toplevel Makefile
MASTER_SRC := client.c daemon.c logging.c main.c plugin.c plugin_helper.c scanner.c serverlist.c
PLUGIN_SRC := hlswproxy.c quake3.c quake2.c halo.c doom3.c ut.c battlefield1942.c
CFLAGS := -Wall -I. -I./include -g
# ############################
all: $(PLUGIN_SRC:%.c=plugins/%.so) src/hlswmaster tools/masterquery
src/hlswmaster: $(MASTER_SRC:%.c=src/%.o)
$(CC) -ldl -lpthread -rdynamic $^ -o $@
tools/masterquery: tools/masterquery.c
$(CC) $(CFLAGS) $< -o $@
%.o: %.c
$(CC) $(CFLAGS) -o $@ -c $<
%_sh.o: %.c
$(CC) $(CFLAGS) -fPIC -o $@ -c $<
%.so: %_sh.o
$(LD) -shared -o $@ $<
clean:
rm -rf src/*.o plugins/*.so plugins/*.o src/hlswmaster tools/masterquery