LOCAL_CPP += main.cpp YAPP_CLASS ?= $(firstword $(basename $(wildcard YApp*.h Y*.h *.h))) YAPP_CLASS_H = $(firstword $(wildcard $(addsuffix /$(YAPP_CLASS).h, $(subst -I,,$(INCLUDE)))) $(YAPP_CLASS).h) all: install: clean: clean.yapp distclean: include $(MODDIR)/make/exe.mk clean.yapp: rm -f main.cpp main.cpp: $(YAPP_CLASS_H) echo -e "#include \n#include \"$<\"\nyapp_main($(YAPP_CLASS))" > $@ dings: echo $(YAPP_CLASS_H)