luci/build/gccconfig.mk
Steven Barth 4e53d007bf * Reworked Makefiles
* Introduced following targets:
	build: gccbuild luabuild
	gccbuild: compile
	luabuild: luasource||luacompile
* Removed requirement for lua-headers respecting lua-only builds
* Split compile part of OpenWRT Makefile
2008-05-28 19:37:43 +00:00

22 lines
602 B
Makefile

OS ?= $(shell uname)
LUA_SHLIBS = $(shell pkg-config --silence-errors --libs lua5.1)
LUA_LIBS = $(if $(LUA_SHLIBS),$(LUA_SHLIBS),$(firstword $(wildcard /usr/lib/liblua.a /usr/local/lib/liblua.a /opt/local/lib/liblua.a)))
LUA_CFLAGS = $(shell pkg-config --silence-errors --cflags lua5.1)
CC = gcc
AR = ar
RANLIB = ranlib
CFLAGS = -O2
FPIC = -fPIC
EXTRA_CFLAGS = --std=gnu99
WFLAGS = -Wall -Werror -pedantic
CPPFLAGS =
COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) $(WFLAGS)
ifeq ($(OS),Darwin)
SHLIB_FLAGS = -bundle -undefined dynamic_lookup
else
SHLIB_FLAGS = -shared
endif
LINK = $(CC)