diff options
| author | William Ahern <william@server.local> | 2013-10-25 15:58:40 -0700 |
|---|---|---|
| committer | William Ahern <william@server.local> | 2013-10-25 15:58:40 -0700 |
| commit | 22184c902bf2670fea9fd1cc6e69e16f9ae91f5b (patch) | |
| tree | 1f705ae99e00f84e3dd4d4c09108edec07ba99a1 | |
| parent | 1890e394cb350ed6e08aa0de834259a255dca7e3 (diff) | |
| download | luaossl-22184c902bf2670fea9fd1cc6e69e16f9ae91f5b.tar.gz luaossl-22184c902bf2670fea9fd1cc6e69e16f9ae91f5b.tar.bz2 luaossl-22184c902bf2670fea9fd1cc6e69e16f9ae91f5b.zip | |
-n
more consistent build targets
| -rw-r--r-- | GNUmakefile | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/GNUmakefile b/GNUmakefile index 17d7681..dde5a9e 100644 --- a/GNUmakefile +++ b/GNUmakefile | |||
| @@ -37,7 +37,7 @@ LDFLAGS_$(d) += -lssl -lcrypto | |||
| 37 | 37 | ||
| 38 | define BUILD_$(d) | 38 | define BUILD_$(d) |
| 39 | 39 | ||
| 40 | .INTERMEDIATE: liblua$(1)-openssl openssl$(1) | 40 | .SECONDARY: liblua$(1)-openssl openssl$(1) |
| 41 | 41 | ||
| 42 | $$(d)/$(1)/openssl.so: $$(d)/$(1)/openssl.o | 42 | $$(d)/$(1)/openssl.so: $$(d)/$(1)/openssl.o |
| 43 | $$(CC) -o $$@ $$^ $$(SOFLAGS_$$(abspath $$(@D)/..)) $$(SOFLAGS) $$(LDFLAGS_$$(abspath $$(@D)/..)) $$(LDFLAGS) | 43 | $$(CC) -o $$@ $$^ $$(SOFLAGS_$$(abspath $$(@D)/..)) $$(SOFLAGS) $$(LDFLAGS_$$(abspath $$(@D)/..)) $$(LDFLAGS) |
| @@ -56,8 +56,13 @@ $(eval $(call BUILD_$(d),5.1)) | |||
| 56 | $(eval $(call BUILD_$(d),5.2)) | 56 | $(eval $(call BUILD_$(d),5.2)) |
| 57 | 57 | ||
| 58 | ifneq "$(filter $(abspath $(d)/..)/%, $(abspath $(firstword $(MAKEFILE_LIST))))" "" | 58 | ifneq "$(filter $(abspath $(d)/..)/%, $(abspath $(firstword $(MAKEFILE_LIST))))" "" |
| 59 | .SECONDARY: all5.1 all5.2 all | ||
| 59 | 60 | ||
| 60 | all: liblua5.1-openssl liblua5.2-openssl | 61 | all5.1: liblua5.1-openssl |
| 62 | |||
| 63 | all5.2: liblua5.2-openssl | ||
| 64 | |||
| 65 | all: all5.1 all5.2 | ||
| 61 | 66 | ||
| 62 | endif | 67 | endif |
| 63 | 68 | ||
| @@ -84,7 +89,7 @@ MODS$(1)_$(d) = \ | |||
| 84 | $$(DESTDIR)$(3)/openssl/hmac.lua \ | 89 | $$(DESTDIR)$(3)/openssl/hmac.lua \ |
| 85 | $$(DESTDIR)$(3)/openssl/cipher.lua | 90 | $$(DESTDIR)$(3)/openssl/cipher.lua |
| 86 | 91 | ||
| 87 | .INTERMEDIATE: liblua$(1)-openssl-install install$(1) | 92 | .SECONDARY: liblua$(1)-openssl-install openssl$(1)-install |
| 88 | 93 | ||
| 89 | $$(DESTDIR)$(2)/_openssl.so: $$(d)/$(1)/openssl.so | 94 | $$(DESTDIR)$(2)/_openssl.so: $$(d)/$(1)/openssl.so |
| 90 | $$(MKDIR) -p $$(@D) | 95 | $$(MKDIR) -p $$(@D) |
| @@ -110,18 +115,16 @@ $$(DESTDIR)$(3)/openssl/ssl/%.lua: $$(d)/openssl.ssl.%.lua | |||
| 110 | $$(MKDIR) -p $$(@D) | 115 | $$(MKDIR) -p $$(@D) |
| 111 | $$(CP) -p $$< $$@ | 116 | $$(CP) -p $$< $$@ |
| 112 | 117 | ||
| 113 | liblua$(1)-openssl-install install$(1): $$(MODS$(1)_$$(d)) | 118 | liblua$(1)-openssl-install openssl$(1)-install: $$(MODS$(1)_$$(d)) |
| 114 | 119 | ||
| 115 | .PHONY: liblua$(1)-openssl-uninstall uninstall$(1) uninstall | 120 | .PHONY: liblua$(1)-openssl-uninstall openssl$(1)-uninstall |
| 116 | 121 | ||
| 117 | liblua$(1)-openssl-uninstall: | 122 | liblua$(1)-openssl-uninstall openssl$(1)-uninstall: |
| 118 | $$(RM) -f $$(MODS$(1)_$(d)) | 123 | $$(RM) -f $$(MODS$(1)_$(d)) |
| 119 | -$$(RMDIR) $$(DESTDIR)$(3)/openssl/x509 | 124 | -$$(RMDIR) $$(DESTDIR)$(3)/openssl/x509 |
| 120 | -$$(RMDIR) $$(DESTDIR)$(3)/openssl/ssl | 125 | -$$(RMDIR) $$(DESTDIR)$(3)/openssl/ssl |
| 121 | -$$(RMDIR) $$(DESTDIR)$(3)/openssl | 126 | -$$(RMDIR) $$(DESTDIR)$(3)/openssl |
| 122 | 127 | ||
| 123 | uninstall$(1): liblua$(1)-openssl-uninstall | ||
| 124 | |||
| 125 | endef # INSTALL_$(d) | 128 | endef # INSTALL_$(d) |
| 126 | 129 | ||
| 127 | $(eval $(call INSTALL_$(d),5.1,$$(lua51cpath),$$(lua51path))) | 130 | $(eval $(call INSTALL_$(d),5.1,$$(lua51cpath),$$(lua51path))) |
| @@ -129,10 +132,21 @@ $(eval $(call INSTALL_$(d),5.1,$$(lua51cpath),$$(lua51path))) | |||
| 129 | $(eval $(call INSTALL_$(d),5.2,$$(lua52cpath),$$(lua52path))) | 132 | $(eval $(call INSTALL_$(d),5.2,$$(lua52cpath),$$(lua52path))) |
| 130 | 133 | ||
| 131 | ifneq "$(filter $(abspath $(d)/..)/%, $(abspath $(firstword $(MAKEFILE_LIST))))" "" | 134 | ifneq "$(filter $(abspath $(d)/..)/%, $(abspath $(firstword $(MAKEFILE_LIST))))" "" |
| 135 | .SECONDARY: install5.1 install5.2 install | ||
| 136 | |||
| 137 | install5.1: liblua5.1-openssl-install | ||
| 138 | |||
| 139 | install5.2: liblua5.2-openssl-install | ||
| 140 | |||
| 141 | install: install5.1 install5.2 | ||
| 142 | |||
| 143 | .PHONY: uninstall5.1 uninstall5.2 uninstall | ||
| 144 | |||
| 145 | uninstall5.1: liblua5.1-openssl-uninstall | ||
| 132 | 146 | ||
| 133 | install: liblua5.1-openssl-install liblua5.2-openssl-install | 147 | uninstall5.2: liblua5.2-openssl-uninstall |
| 134 | 148 | ||
| 135 | uninstall: liblua5.1-openssl-uninstall liblua5.2-openssl-uninstall | 149 | uninstall: uninstall5.1 uninstall5.2 |
| 136 | 150 | ||
| 137 | endif | 151 | endif |
| 138 | 152 | ||
