makefile 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. T05: check
  2. @echo "-------- Sample 5 --------"
  3. @echo && echo "Now compile a SWC and demo SWF"
  4. "$(FLASCC)/usr/bin/g++" $(BASE_CFLAGS) \
  5. main.cpp \
  6. as3api.cpp \
  7. hashlib/hl_md5.cpp \
  8. hashlib/hl_md5wrapper.cpp \
  9. -O4 -disable-telemetry -flto-api=exports.txt\
  10. -emit-swc=com.webuploader -o Test.swc
  11. # "$(FLEX)/bin/mxmlc" -static-link-runtime-shared-libraries -compiler.omit-trace-statements=false -library-path=MurmurHash.swc -debug=false swcdemo.as -o swcdemo.swf
  12. FLASCC:=X
  13. FLEX:=X
  14. AS3COMPILER:=asc2.jar
  15. BASE_CFLAGS:=-Werror -Wno-write-strings -Wno-trigraphs
  16. $?UNAME=$(shell uname -s)
  17. ifneq (,$(findstring CYGWIN,$(UNAME)))
  18. $?nativepath=$(shell cygpath -at mixed $(1))
  19. $?unixpath=$(shell cygpath -at unix $(1))
  20. else
  21. $?nativepath=$(abspath $(1))
  22. $?unixpath=$(abspath $(1))
  23. endif
  24. ifneq (,$(findstring "asc2.jar","$(AS3COMPILER)"))
  25. $?AS3COMPILERARGS=java $(JVMARGS) -jar $(call nativepath,$(FLASCC)/usr/lib/$(AS3COMPILER)) -merge -md
  26. else
  27. echo "ASC is no longer supported" ; exit 1 ;
  28. endif
  29. check:
  30. @if [ -d $(FLASCC)/usr/bin ] ; then true ; \
  31. else echo "Couldn't locate FLASCC sdk directory, please invoke make with \"make FLASCC=/path/to/FLASCC/sdk ...\"" ; exit 1 ; \
  32. fi
  33. @if [ -d "$(FLEX)/bin" ] ; then true ; \
  34. else echo "Couldn't locate Flex sdk directory, please invoke make with \"make FLEX=/path/to/flex ...\"" ; exit 1 ; \
  35. fi
  36. clean:
  37. rm -f *.swf *.swc *.bc *.exe