sm-zombiereloaded-3/Makefile

33 lines
694 B
Makefile
Raw Normal View History

2008-10-04 22:59:11 +02:00
SOURCEDIR=src
BUILDDIR=build
SPCOMP=bin/spcomp
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
$(SPCOMP) -i$(SOURCEDIR) -i$(SOURCEDIR)/include -o$(BUILDDIR)/$@ $<
clean:
@echo "Removing build directory"
@rm -fr $(BUILDDIR)