yapp.mk: Find $(YAPP_CLASS).h in $(INCLUDE) path

This commit is contained in:
Jan Lindemann 2007-01-20 17:50:14 +00:00 committed by Jan Lindemann
commit bec2fe4ecd

View file

@ -1,5 +1,6 @@
LOCAL_CPP += main.cpp
YAPP_CLASS ?= YApplication
YAPP_CLASS_H = $(firstword $(wildcard $(addsuffix /$(YAPP_CLASS).h, $(subst -I,,$(INCLUDE)))) $(YAPP_CLASS).h)
all:
install:
@ -11,7 +12,10 @@ include $(MODDIR)/make/exe.mk
clean.yapp:
rm -f main.cpp
main.cpp: $(YAPP_CLASS).h
echo -e "#include <YAppRunner.h>\n#include <$<>\nyapp_main($(basename $<))" > $@
main.cpp: $(YAPP_CLASS_H)
echo -e "#include <YAppRunner.h>\n#include \"$<\"\nyapp_main($(YAPP_CLASS))" > $@
dings:
echo $(YAPP_CLASS_H)