Makefile
changeset 32 6dc2d52e4b13
parent 29 c5d00a24af56
equal deleted inserted replaced
31:9c66c159a3a6 32:6dc2d52e4b13
    27 #
    27 #
    28 # If you have problems building volta, manually pass the correct CFLAGS
    28 # If you have problems building volta, manually pass the correct CFLAGS
    29 # and LIBS to the 'make' command line for your platform.
    29 # and LIBS to the 'make' command line for your platform.
    30 #
    30 #
    31 # The following works for OSX with macports or homebrew (10.6/10.7),
    31 # The following works for OSX with macports or homebrew (10.6/10.7),
    32 # FreeBSD 8.x and 9.x, and Ubuntu 11.10 and 12.04.
    32 # FreeBSD 8.x through 10.x, and Ubuntu 11.10 through 14.04.
    33 
    33 
    34 # Ubuntu
    34 # Ubuntu
    35 #  - perftools doesn't currently register a .pc file at all
    35 #  - perftools doesn't currently register a .pc file at all
    36 #  - lua is called 'lua5.1'
    36 #  - lua is called 'lua5.2'
    37 ifeq ($(UNAME), Linux)
    37 ifeq ($(UNAME), Linux)
    38 volta: CFLAGS += -L/usr/lib -I/usr/include
    38 volta: CFLAGS += -L/usr/lib -I/usr/include
    39 volta: CFLAGS += $(shell pkg-config --cflags-only-I --libs-only-L lua5.1)
    39 volta: CFLAGS += $(shell pkg-config --cflags-only-I --libs-only-L lua5.2)
    40 volta: LIBS   += $(shell pkg-config --libs-only-l lua5.1)
    40 volta: LIBS   += $(shell pkg-config --libs-only-l lua5.2)
    41 debug: CFLAGS += $(CFLAGS_DEBUG)\
    41 debug: CFLAGS += $(CFLAGS_DEBUG)\
    42 	$(shell pkg-config --cflags-only-I --libs-only-L lua5.1)
    42 	$(shell pkg-config --cflags-only-I --libs-only-L lua5.2)
    43 debug: LIBS   += $(shell pkg-config --libs-only-l lua5.1) -lprofiler
    43 debug: LIBS   += $(shell pkg-config --libs-only-l lua5.2) -lprofiler
    44 
    44 
    45 # FreeBSD
    45 # FreeBSD
    46 # - lua is called 'lua-5.1'
    46 # - lua is called 'lua-5.2'
    47 else ifeq ($(UNAME), FreeBSD)
    47 else ifeq ($(UNAME), FreeBSD)
    48 volta: CFLAGS += -L/usr/local/lib -I/usr/local/include
    48 volta: CFLAGS += -L/usr/local/lib -I/usr/local/include
    49 volta: CFLAGS += $(shell pkg-config --cflags-only-I --libs-only-L lua-5.1)
    49 volta: CFLAGS += $(shell pkg-config --cflags-only-I --libs-only-L lua-5.2)
    50 volta: LIBS   += $(shell pkg-config --libs-only-l lua-5.1)
    50 volta: LIBS   += $(shell pkg-config --libs-only-l lua-5.2)
    51 debug: CFLAGS += $(CFLAGS_DEBUG)\
    51 debug: CFLAGS += $(CFLAGS_DEBUG)\
    52     $(shell pkg-config --cflags-only-I --libs-only-L lua-5.1 $(DEPS_DEBUG))
    52     $(shell pkg-config --cflags-only-I --libs-only-L lua-5.2 $(DEPS_DEBUG))
    53 debug: LIBS += $(shell pkg-config --libs-only-l lua-5.1 $(DEPS_DEBUG))
    53 debug: LIBS += $(shell pkg-config --libs-only-l lua-5.2 $(DEPS_DEBUG))
    54 
    54 
    55 # Darwin, everyone else (best guess?)
    55 # Darwin, everyone else (best guess?)
    56 # - lua is called 'lua', hopefully!
    56 # - lua is called 'lua', hopefully!
    57 else
    57 else
    58 volta: CFLAGS += $(shell pkg-config --cflags-only-I --libs-only-L lua)
    58 volta: CFLAGS += $(shell pkg-config --cflags-only-I --libs-only-L lua)