jw-pkg/make/yapp.mk
2011-02-20 14:15:22 +00:00

24 lines
614 B
Makefile

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)
LOCAL_CFLAGS += -DVERSION_STR=\"$(VERSION)\"
LOCAL_CPPFLAGS += -DVERSION_STR=\"$(VERSION)\"
ifneq ($(TARGET),mingw)
LOCAL_LDFLAGS += -rdynamic
endif
include $(MODDIR)/make/exe.mk
all: build_EXE
install: install_EXE
clean: clean.yapp
distclean:
clean.yapp:
rm -f main.cpp
main.cpp: $(YAPP_CLASS_H)
echo -e "#include \"$<\"\n#include <YAppRunner.h>\nyapp_main($(YAPP_CLASS))" > $@