sm-zombiereloaded-3/Makefile

36 lines
790 B
Makefile
Raw Normal View History

2008-10-04 22:59:11 +02:00
SOURCEDIR=src
SMINCLUDES=env/include
2008-10-04 22:59:11 +02:00
BUILDDIR=build
SPCOMP=env/linux/bin/spcomp
VERSIONDUMP=./updateversion.sh
2008-10-04 22:59:11 +02:00
vpath %.sp $(SOURCEDIR)
vpath %.inc $(SOURCEDIR)/include
vpath %.smx $(BUILDDIR)
SOURCEFILES=$(SOURCEDIR)/*.sp
OBJECTS=$(patsubst %.sp, %.smx, $(notdir $(wildcard $(SOURCEFILES))))
all: prepare $(OBJECTS)
prepare: prepare_newlines prepare_builddir
prepare_newlines:
@echo "Removing windows newlines"
@find $(SOURCEDIR) -name \*.inc -exec dos2unix -p '{}' \;
@find $(SOURCEDIR) -name \*.sp -exec dos2unix -p '{}' \;
prepare_builddir:
@echo "Creating build directory"
@mkdir -p $(BUILDDIR)
%.smx: %.sp
$(VERSIONDUMP)
$(SPCOMP) -i$(SOURCEDIR) -i$(SOURCEDIR)/include -i$(SMINCLUDES) -o$(BUILDDIR)/$@ $<
2008-10-04 22:59:11 +02:00
clean:
@echo "Removing build directory"
@rm -fr $(BUILDDIR)