make dir unhidden
[henge/webcc.git] / make / SDL2.mk
diff --git a/make/SDL2.mk b/make/SDL2.mk
new file mode 100644 (file)
index 0000000..2b85c1d
--- /dev/null
@@ -0,0 +1,26 @@
+################################################################################
+# Desc:   SDL2 Build Data
+# Author: Mihrtec LLC
+# Date:   2016
+################################################################################
+# SDL2 natively supports transpiling (well, almost)
+################################################################################
+# Download location
+HGADDR    := https://hg.libsdl.org/SDL
+# No autogen for SDL
+undefine AUTOGEN
+# Ensure we have our other libraries, and their associated
+# accutrements (like jpeg/tiff, etc from SDL2_image)
+LIBDEPS   := SDL2_image SDL2_ttf SDL2_net
+# Modifications to the build process when using specific compilers
+define emccMOD =
+$(eval CONFIGURE += --enable-joystick=no)
+$(eval CONFIGURE += --enable-pthreads=no)
+$(eval CONFIGURE += --enable-threads=no)
+MKCMD     := $(subst  make , emmake make ,$(MKCMD))
+CONFIGURE := $(subst  ./configure , emconfigure ./configure ,$(CONFIGURE))
+endef
+define em++MOD =
+$(call EMCCMOD)
+endef
+$(eval $(call $(c_C)MOD))