# 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 q3engine.c quake2.c gamespy1.c gamespy2.c ut.c doom3.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