2022-12-11 18:58:11 +01:00
|
|
|
# The lua-osx Makefile
|
|
|
|
# Author: Lorenzo Cogotti, The DoubleFourteen Code Forge
|
|
|
|
#
|
|
|
|
# For general configuration see config.mk.
|
|
|
|
# For system specific configuration see other config.*s.
|
|
|
|
#
|
|
|
|
# To pick a specific system configuration use the CONFIG variable
|
|
|
|
# (config.unix by default), e.g.:
|
|
|
|
# make CONFIG=config.macosx
|
|
|
|
#
|
|
|
|
# By default we build against system's lua interpreter,
|
|
|
|
# to build against other implementations use the LUA variable, e.g.:
|
|
|
|
# make LUA=luajit
|
|
|
|
#
|
|
|
|
# To manually specify lua's include path, library path and library name use:
|
|
|
|
# LUA_INCDIR, LUA_LIBDIR and LUALIB variables respectively.
|
|
|
|
# By default these are automatically detected via pkg-config.
|
|
|
|
#
|
|
|
|
# To manually specify the module install path use the LIBDIR variable,
|
|
|
|
# By default it is automatically detected via pkg-config.
|
|
|
|
#
|
|
|
|
# NOTE: there is NO support for the MSVC compiler.
|
|
|
|
|
|
|
|
CONFIG = config.unix
|
|
|
|
|
|
|
|
include config.mk
|
|
|
|
include $(CONFIG)
|
|
|
|
|
|
|
|
lib = osx.$(LIB_EXTENSION)
|
|
|
|
src = osx.c
|
|
|
|
o = $(src:.c=.o)
|
|
|
|
_o = $(_src:.c=.o)
|
|
|
|
|
|
|
|
.c.o:
|
|
|
|
$(CC) -std=c11 $(_cflags) $(CFLAGS) -c $<
|
|
|
|
|
|
|
|
all: $(lib)
|
|
|
|
|
|
|
|
$(_o): $(_src) xconf.h osx_dir.h
|
|
|
|
|
|
|
|
osx.o: osx.c xconf.h luacompat.h osx.h osx_dir.h
|
|
|
|
|
|
|
|
$(lib): $(o) $(_o)
|
|
|
|
$(LD) $(LIBFLAG) -o $@ $(_ldflags) $(LDFLAGS) $(o) $(_o)
|
|
|
|
|
2022-12-14 13:50:42 +01:00
|
|
|
doc/index.html: README.md config.ld osx.c
|
2022-12-14 12:34:47 +01:00
|
|
|
$(LDOC) .
|
|
|
|
|
|
|
|
doc: doc/index.html
|
|
|
|
|
2022-12-11 18:58:11 +01:00
|
|
|
install:
|
|
|
|
-$(MKDIR) $(DESTDIR)$(LIBDIR)/osx $(DESTDIR)$(LIBDIR)/osx/include
|
|
|
|
$(CP) $(lib) $(DESTDIR)$(LIBDIR)/osx/
|
|
|
|
$(CP) osx.h osx_dir.h $(DESTDIR)$(LIBDIR)/osx/include/
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
-$(RM) $(DESTDIR)$(LIBDIR)/osx/$(lib)
|
|
|
|
-$(RM) $(DESTDIR)$(LIBDIR)/osx/include/osx.h $(DESTDIR)$(LIBDIR)/osx/include/osx_dir.h
|
|
|
|
-$(RMDIR) $(DESTDIR)$(LIBDIR)/osx/include $(DESTDIR)$(LIBDIR)/osx
|
|
|
|
|
|
|
|
clean:
|
2022-12-14 12:46:15 +01:00
|
|
|
-$(RM) -R doc
|
2022-12-11 18:58:11 +01:00
|
|
|
-$(RM) $(lib) $(o) $(_o)
|