1 .PHONY
: all install clean dist dist-all dist-bzip2 dist-gzip dist-zip
7 INSTALL_PROGRAM
= $(INSTALL
)
8 INSTALL_DATA
= $(INSTALL
) -m
644
15 LUA_INC_DIR ?
= /usr
/include/lua5.1
17 INSTALL_DIR_LUA ?
= /usr
/share
/lua
/5.1
18 INSTALL_DIR_BIN ?
= /usr
/lib
/lua
/5.1
24 $(CC
) $(CFLAGS
) -c
-Iinclude
-I
$(LUA_INC_DIR
) src
/*.c
25 $(CC
) $(LDFLAGS
) -o
$(LIB
) *.o
-levent
27 dist dist-all
: distdir dist-bzip2 dist-gzip dist-zip
32 VERSION
=luaevent-
$(shell git describe
--abbrev
=4 HEAD
2>/dev
/null
)
34 git archive
--format
=tar --prefix=$(VERSION
)/ HEAD | bzip2
-9v
> $(DIST_DIR
)/$(VERSION
).
tar.bz2
36 git archive
--format
=tar --prefix=$(VERSION
)/ HEAD | gzip
-9v
> $(DIST_DIR
)/$(VERSION
).
tar.gz
38 git archive
--format
=zip
--prefix=$(VERSION
)/ HEAD
> $(DIST_DIR
)/$(VERSION
).zip
41 mkdir
-p
$(DESTDIR
)$(INSTALL_DIR_LUA
)
42 $(INSTALL_DATA
) lua
/luaevent.lua
$(DESTDIR
)$(INSTALL_DIR_LUA
)/luaevent.lua
43 mkdir
-p
$(DESTDIR
)$(INSTALL_DIR_BIN
)/luaevent
/
44 $(INSTALL_PROGRAM
) $(LIB
) $(DESTDIR
)$(INSTALL_DIR_BIN
)/luaevent
/$(LIB
)