diff options
| author | Oscar Lim <olim@ucla.edu> | 2016-05-07 14:37:25 -0700 |
|---|---|---|
| committer | Oscar Lim <olim@ucla.edu> | 2016-05-08 16:01:40 -0700 |
| commit | 8c1a0fca53bf11f2b7ce708c8c5bdb05e5a55701 (patch) | |
| tree | 9624af38c4ba35de244da2281e08049589140e20 /src/Makefile | |
| parent | 040d7066649ddfcb72424b1cb70d6ad00ea84a21 (diff) | |
| download | luasystem-8c1a0fca53bf11f2b7ce708c8c5bdb05e5a55701.tar.gz luasystem-8c1a0fca53bf11f2b7ce708c8c5bdb05e5a55701.tar.bz2 luasystem-8c1a0fca53bf11f2b7ce708c8c5bdb05e5a55701.zip | |
Support for monotime
Provide `monotime` function with at least 1 millisecond resolution.
Diffstat (limited to 'src/Makefile')
| -rw-r--r-- | src/Makefile | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/src/Makefile b/src/Makefile index 25f468d..10fc31a 100644 --- a/src/Makefile +++ b/src/Makefile | |||
| @@ -4,13 +4,28 @@ | |||
| 4 | # environment. | 4 | # environment. |
| 5 | # | 5 | # |
| 6 | 6 | ||
| 7 | # PLAT: linux macosx win32 mingw | 7 | # PLAT: linux macosx win32 mingw freebsd |
| 8 | # platform to build for | 8 | # platform to build for |
| 9 | ifeq ($(origin PLAT),undefined) | ||
| 10 | UNAME_S:=$(shell uname -s) | ||
| 11 | ifeq ($(UNAME_S),Linux) | ||
| 12 | PLAT=linux | ||
| 13 | endif | ||
| 14 | ifeq ($(UNAME_S),Darwin) | ||
| 15 | PLAT=macosx | ||
| 16 | endif | ||
| 17 | ifeq ($(UNAME_S),FreeBSD) | ||
| 18 | PLAT=freebsd | ||
| 19 | endif | ||
| 20 | ifeq ($(patsubst MINGW%,MINGW,$(UNAME_S)),MINGW) | ||
| 21 | PLAT=mingw | ||
| 22 | endif | ||
| 23 | endif | ||
| 9 | PLAT?=linux | 24 | PLAT?=linux |
| 10 | 25 | ||
| 11 | # LUA_VERSION: 5.1 5.2 5.3 | 26 | # LUA_VERSION: 5.1 5.2 5.3 |
| 12 | # lua version to build against | 27 | # lua version to build against |
| 13 | LUA_VERSION?=5.1 | 28 | LUA_VERSION?=$(basename $(word 2,$(shell lua -v))) |
| 14 | 29 | ||
| 15 | # MYCFLAGS: to be set by user if needed | 30 | # MYCFLAGS: to be set by user if needed |
| 16 | MYCFLAGS= | 31 | MYCFLAGS= |
| @@ -130,7 +145,7 @@ CC_linux=gcc | |||
| 130 | DEF_linux= | 145 | DEF_linux= |
| 131 | CFLAGS_linux= -I$(LUAINC) $(DEF) -Wall -Wshadow -Wextra \ | 146 | CFLAGS_linux= -I$(LUAINC) $(DEF) -Wall -Wshadow -Wextra \ |
| 132 | -Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden | 147 | -Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden |
| 133 | LDFLAGS_linux=-O -shared -fpic -o | 148 | LDFLAGS_linux=-lrt -O -shared -fpic -o |
| 134 | LD_linux=gcc | 149 | LD_linux=gcc |
| 135 | 150 | ||
| 136 | #------ | 151 | #------ |
| @@ -151,7 +166,7 @@ LD_freebsd=gcc | |||
| 151 | SO_mingw=dll | 166 | SO_mingw=dll |
| 152 | O_mingw=o | 167 | O_mingw=o |
| 153 | CC_mingw=gcc | 168 | CC_mingw=gcc |
| 154 | DEF_mingw=-DWINVER=0x0501 | 169 | DEF_mingw=-DWINVER=0x0600 -D_WIN32_WINNT=0x0600 |
| 155 | CFLAGS_mingw= -I$(LUAINC) $(DEF) -Wall -O2 -fno-common \ | 170 | CFLAGS_mingw= -I$(LUAINC) $(DEF) -Wall -O2 -fno-common \ |
| 156 | -fvisibility=hidden | 171 | -fvisibility=hidden |
| 157 | LDFLAGS_mingw= $(LUALIB) -shared -Wl,-s -o | 172 | LDFLAGS_mingw= $(LUALIB) -shared -Wl,-s -o |
| @@ -165,7 +180,8 @@ SO_win32=dll | |||
| 165 | O_win32=obj | 180 | O_win32=obj |
| 166 | CC_win32=cl | 181 | CC_win32=cl |
| 167 | DEF_win32= //D "WIN32" //D "NDEBUG" //D "_WINDOWS" //D "_USRDLL" \ | 182 | DEF_win32= //D "WIN32" //D "NDEBUG" //D "_WINDOWS" //D "_USRDLL" \ |
| 168 | //D "_CRT_SECURE_NO_WARNINGS" //D "_WINDLL" | 183 | //D "_CRT_SECURE_NO_WARNINGS" //D "_WINDLL" \ |
| 184 | //D"WINVER=0x0600" //D"_WIN32_WINNT=0x0600" | ||
| 169 | CFLAGS_win32=//I "$(LUAINC)" $(DEF) //O2 //Ot //MD //W3 //nologo | 185 | CFLAGS_win32=//I "$(LUAINC)" $(DEF) //O2 //Ot //MD //W3 //nologo |
| 170 | LDFLAGS_win32= //nologo //link //NOLOGO //DLL //INCREMENTAL:NO \ | 186 | LDFLAGS_win32= //nologo //link //NOLOGO //DLL //INCREMENTAL:NO \ |
| 171 | //MANIFEST //MANIFESTFILE:"intermediate.manifest" \ | 187 | //MANIFEST //MANIFESTFILE:"intermediate.manifest" \ |
