Skip to content

Instantly share code, notes, and snippets.

@mtwilliams
Created September 1, 2014 04:40
Show Gist options
  • Save mtwilliams/8955cf9e119b95eea8ad to your computer and use it in GitHub Desktop.
Save mtwilliams/8955cf9e119b95eea8ad to your computer and use it in GitHub Desktop.
Forgive me Father for I have sinned.
$(BUILD)/lib/agl.lib: $(BUILD)/bin/agl.dll
@echo "[AR] $@"
@mkdir -p ${@D}
@dumpbin -exports "$(call posix-to-windows,$<)" > $(@:%.lib=%.exports)
@echo EXPORTS >> $(@:%.lib=%.def)
@tail -n +20 $(@:%.lib=%.exports) | awk -F" " '{print $$4}' | sed '/^$$/d' >> $(@:%.lib=%.def)
@rm $(@:%.lib=%.exports)
@lib $(ARFLAGS) -DEF:"$(call posix-to-windows,$(@:%.lib=%.def))" -OUT:"$(call posix-to-windows,$@)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment