hlswmaster/Makefile
2006-02-02 16:24:06 +01:00

30 lines
666 B
Makefile

# 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
PLUGIN_SRC := plugins/quake3.c
CFLAGS := -Wall -I. -I./include -g -fPIC
DEPFILES := $(PLUGIN_SRC:%.c=%.d) $(MASTER_SRC:%.c=%.d)
# ############################
all: $(DEPFILES) $(PLUGIN_SRC:%.c=%.so) src/hlswmaster
src/hlswmaster: $(MASTER_SRC:%.c=%.o)
gcc -ldl -lpthread -rdynamic $^ -o $@
%.d: %.c
@-$(CC) -M -MG $(CFLAGS) $< > $@
%.o: %.c %.d
$(CC) $(CFLAGS) -o $@ -c $<
%.so: %.o
$(LD) -shared -o $@ $<
clean:
rm -rf src/hlswmaster src/*.o plugins/*.so plugins/*.o $(DEPFILES)
-include $(DEPFILES)