diff options
-rw-r--r-- | src/master/Makefile | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/master/Makefile b/src/master/Makefile index 2f60b413..a3a3f879 100644 --- a/src/master/Makefile +++ b/src/master/Makefile @@ -1,6 +1,13 @@ BD_DEBUG=debug-$(PLATFORM)-$(ARCH) BD_RELEASE=release-$(PLATFORM)-$(ARCH) +ifndef PLATFORM + PLATFORM=$(shell uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]') +endif +ifndef ARCH + ARCH=$(shell uname -m | sed -e s/i.86/x86/) +endif + ifeq ($(PLATFORM),mingw32) BINEXT=.exe RELEASE_LDFLAGS=-lwsock32 @@ -49,3 +56,9 @@ makedirs: @if [ ! -d $(BD_DEBUG) ];then $(MKDIR) $(BD_DEBUG);fi .PHONY: all clean release debug makedirs + +# for f in *.c ; do cpp -MM ${f} -MT\$\(BD\)/${f%.c}.o ; done +$(BD)/master.o: master.c common.h messages.h servers.h +$(BD)/messages.o: messages.c common.h messages.h servers.h +$(BD)/servers.o: servers.c common.h servers.h +$(BD)/stats.o: stats.c common.h |