hlswmaster/Makefile

24 lines
578 B
Makefile
Raw Normal View History

2006-02-02 16:24:06 +01:00
# Toplevel Makefile
MASTER_SRC := src/client.c src/daemon.c src/logging.c src/main.c src/plugin.c src/plugin_helper.c src/scanner.c src/serverlist.c
2006-02-02 16:27:19 +01:00
PLUGIN_SRC := plugins/hlswproxy.c plugins/quake3.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:27:19 +01:00
all: $(PLUGIN_SRC:%.c=%.so) src/hlswmaster
2006-02-02 16:24:06 +01:00
src/hlswmaster: $(MASTER_SRC:%.c=%.o)
gcc -ldl -lpthread -rdynamic $^ -o $@
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:27:19 +01:00
rm -rf src/hlswmaster src/*.o plugins/*.so plugins/*.o