diff options
| author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2009-05-27 09:31:38 +0000 |
|---|---|---|
| committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2009-05-27 09:31:38 +0000 |
| commit | bce60be30fe8e9c1b0eb33128c23c93d7bca5303 (patch) | |
| tree | 3927343c777fcb7764a0f2f89754a0ceab141c21 /makefile | |
| parent | d1a72435d5bd3528f3c334cd4d1da16dcead47bf (diff) | |
| download | luasocket-bce60be30fe8e9c1b0eb33128c23c93d7bca5303.tar.gz luasocket-bce60be30fe8e9c1b0eb33128c23c93d7bca5303.tar.bz2 luasocket-bce60be30fe8e9c1b0eb33128c23c93d7bca5303.zip | |
Decent makefiles!
Diffstat (limited to 'makefile')
| -rw-r--r-- | makefile | 56 |
1 files changed, 14 insertions, 42 deletions
| @@ -1,51 +1,23 @@ | |||
| 1 | #------ | 1 | PLAT= none |
| 2 | # Load configuration | 2 | PLATS= macosx linux |
| 3 | # | ||
| 4 | include config | ||
| 5 | 3 | ||
| 6 | #------ | 4 | #------ |
| 7 | # Hopefully no need to change anything below this line | 5 | # Hopefully no need to change anything below this line |
| 8 | # | 6 | # |
| 9 | INSTALL_SOCKET_SHARE=$(INSTALL_TOP_SHARE)/socket | 7 | all: $(PLAT) |
| 10 | INSTALL_SOCKET_LIB=$(INSTALL_TOP_LIB)/socket | ||
| 11 | INSTALL_MIME_SHARE=$(INSTALL_TOP_SHARE)/mime | ||
| 12 | INSTALL_MIME_LIB=$(INSTALL_TOP_LIB)/mime | ||
| 13 | |||
| 14 | all clean: | ||
| 15 | cd src; $(MAKE) $@ | ||
| 16 | 8 | ||
| 17 | #------ | 9 | none: |
| 18 | # Files to install | 10 | @echo "Please run" |
| 19 | # | 11 | @echo " make PLATFORM" |
| 20 | TO_SOCKET_SHARE:= \ | 12 | @echo "where PLATFORM is one of these:" |
| 21 | http.lua \ | 13 | @echo " $(PLATS)" |
| 22 | url.lua \ | ||
| 23 | tp.lua \ | ||
| 24 | ftp.lua \ | ||
| 25 | smtp.lua | ||
| 26 | 14 | ||
| 27 | TO_TOP_SHARE:= \ | 15 | $(PLATS) install local clean: |
| 28 | ltn12.lua \ | 16 | cd src; $(MAKE) $@ |
| 29 | socket.lua \ | ||
| 30 | mime.lua | ||
| 31 | 17 | ||
| 32 | TO_MIME_SHARE:= | 18 | dummy: |
| 33 | 19 | ||
| 34 | #------ | 20 | test: dummy |
| 35 | # Install LuaSocket according to recommendation | 21 | lua test/hello.lua |
| 36 | # | ||
| 37 | install: all | ||
| 38 | cd src; mkdir -p $(INSTALL_TOP_SHARE) | ||
| 39 | cd src; $(INSTALL_DATA) $(TO_TOP_SHARE) $(INSTALL_TOP_SHARE) | ||
| 40 | cd src; mkdir -p $(INSTALL_SOCKET_SHARE) | ||
| 41 | cd src; $(INSTALL_DATA) $(TO_SOCKET_SHARE) $(INSTALL_SOCKET_SHARE) | ||
| 42 | cd src; mkdir -p $(INSTALL_SOCKET_LIB) | ||
| 43 | cd src; $(INSTALL_EXEC) $(SOCKET_SO) $(INSTALL_SOCKET_LIB)/core.$(EXT) | ||
| 44 | #cd src; mkdir -p $(INSTALL_MIME_SHARE) | ||
| 45 | #cd src; $(INSTALL_DATA) $(TO_MIME_SHARE) $(INSTALL_MIME_SHARE) | ||
| 46 | cd src; mkdir -p $(INSTALL_MIME_LIB) | ||
| 47 | cd src; $(INSTALL_EXEC) $(MIME_SO) $(INSTALL_MIME_LIB)/core.$(EXT) | ||
| 48 | 22 | ||
| 49 | #------ | 23 | .PHONY: dummy |
| 50 | # End of makefile | ||
| 51 | # | ||
