forked from jmaygarden/gzio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
77 lines (57 loc) · 1.36 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# makefile for building the gzip file I/O library
# == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT =======================
LUAPATH= /usr/local/share/lua/5.1
LUACPATH= /usr/local/lib/lua/5.1
INCDIR= -I/usr/include/lua5.1
LIBDIR= -L/usr/lib
LUALIB=lua5.1
ifeq ($(OPENWRT_BUILD),1)
INCDIR=
LIBDIR=
LUALIB=lua
endif
CFLAGS+= -fPIC -O2 -Wall -pedantic $(INCDIR)
AR= ar rcu
RANLIB= ranlib
LD=gcc
LDFLAGS+= -shared
RM=rm -f
LIBS= -lm -lz -l$(LUALIB)
# == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
EXT=so
GZIO_V=1.0.1
GZIO_SO=gzio.$(EXT)
GZIO_O= lgziolib.o
ALL_O= $(GZIO_O)
ALL_T= $(GZIO_SO)
ALL_A= $(GZIO_SO)
default: all
all: $(ALL_T)
o: $(ALL_O)
a: $(ALL_A)
$(GZIO_SO): $(GZIO_O)
$(LD) $(LDFLAGS) -o $@ $? $(LIBS)
TAG_FILES = lgziolib.c lgziolib.h
tags: $(TAG_FILES)
ctags $(TAG_FILES)
clean:
$(RM) $(ALL_T) $(ALL_O) tags
depend:
@$(CC) $(CFLAGS) -MM lgziolib.c
echo:
@echo "PLAT = $(PLAT)"
@echo "CC = $(CC)"
@echo "CFLAGS = $(CFLAGS)"
@echo "AR = $(AR)"
@echo "RANLIB = $(RANLIB)"
@echo "RM = $(RM)"
@echo "MYCFLAGS = $(MYCFLAGS)"
@echo "MYLDFLAGS = $(MYLDFLAGS)"
@echo "MYLIBS = $(MYLIBS)"
install:
cp $(GZIO_SO) $(LUACPATH)
# list targets that do not create files (but not all makes understand .PHONY)
.PHONY: all default o a clean depend echo none
# DO NOT DELETE
lgziolib.o: lgziolib.c lgziolib.h
# (end of Makefile)