jw-pkg/make/yapp.mk

27 lines
676 B
Makefile
Raw Normal View History

SRC_ALL_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)
YAPP_NAMESPACE ?=
ifneq ($(TARGET),mingw)
LOCAL_LDFLAGS += -rdynamic
endif
include $(MODDIR)/make/exe.mk
2006-07-02 15:26:16 +00:00
2007-08-21 16:20:30 +00:00
all: build_EXE
install: install_EXE
2006-07-02 15:26:16 +00:00
clean: clean.yapp
distclean:
clean.yapp:
rm -f main.cpp
main.cpp: $(YAPP_CLASS_H)
echo "#include \"$<\"" > $@.tmp
if [ "$(YAPP_NAMESPACE)" ]; then echo "using namespace $(YAPP_NAMESPACE);" >> $@.tmp; fi
echo "#include <YAppRunner.h>" >> $@.tmp
echo "yapp_main($(YAPP_CLASS))" >> $@.tmp
mv $@.tmp $@