hlswmaster/Makefile

29 lines
694 B
Makefile
Raw Normal View History

2006-02-02 16:24:06 +01:00
# Toplevel Makefile
2006-02-02 16:29:30 +01:00
MASTER_SRC := client.c daemon.c logging.c main.c plugin.c plugin_helper.c scanner.c serverlist.c
2006-02-02 16:31:52 +01:00
PLUGIN_SRC := hlswproxy.c q3engine.c quake2.c gamespy1.c gamespy2.c ut.c doom3.c
2006-02-02 16:24:06 +01:00
2006-02-02 16:27:19 +01:00
CFLAGS := -Wall -I. -I./include -g
2006-02-02 16:24:06 +01:00
# ############################
2006-02-02 16:29:30 +01:00
all: $(PLUGIN_SRC:%.c=plugins/%.so) src/hlswmaster tools/masterquery
2006-02-02 16:24:06 +01:00
2006-02-02 16:29:30 +01:00
src/hlswmaster: $(MASTER_SRC:%.c=src/%.o)
$(CC) -ldl -lpthread -rdynamic $^ -o $@
tools/masterquery: tools/masterquery.c
$(CC) $(CFLAGS) $< -o $@
2006-02-02 16:24:06 +01:00
2006-02-02 16:27:19 +01:00
%.o: %.c
2006-02-02 16:24:06 +01:00
$(CC) $(CFLAGS) -o $@ -c $<
2006-02-02 16:27:19 +01:00
%_sh.o: %.c
$(CC) $(CFLAGS) -fPIC -o $@ -c $<
%.so: %_sh.o
2006-02-02 16:24:06 +01:00
$(LD) -shared -o $@ $<
clean:
2006-02-02 16:29:30 +01:00
rm -rf src/*.o plugins/*.so plugins/*.o src/hlswmaster tools/masterquery