File: Makefile

package info (click to toggle)
notion 4.0.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 4,656 kB
  • sloc: ansic: 47,365; sh: 2,093; makefile: 594; perl: 270
file content (69 lines) | stat: -rw-r--r-- 1,378 bytes parent folder | download | duplicates (2)
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
##
## Extl Makefile
##

ifeq ($(MAKELEVEL),0)
TOPDIR=.
else
TOPDIR=..
endif

# System-specific configuration
include $(TOPDIR)/build/system-inc.mk

######################################

INCLUDES += $(LIBTU_INCLUDES) $(LUA_INCLUDES)

CFLAGS += $(XOPEN_SOURCE) $(C99_SOURCE)

SOURCES=readconfig.c luaextl.c misc.c

LIBS += $(LIBTU_LIBS) $(LUA_LIBS) $(DL_LIBS) -lm

HEADERS=readconfig.h extl.h luaextl.h private.h types.h

TARGETS=libextl.a libextl-mkexports

SUBDIRS = test

.PHONY : libextl-mkexports test

######################################

include $(TOPDIR)/build/rules.mk

######################################

ifdef LUA

libextl.a: $(OBJS)
	$(AR) $(ARFLAGS) $@ $+

libextl-mkexports: libextl-mkexports.in
	sed "1s:LUA50:$(LUA):" $< > $@

else

libextl.a: libextl-mkexports.in
	echo "Error: LUA interpreter and libraries not found (or inconsistent versions)"
	return -1

libextl-mkexports: libextl-mkexports.in
	echo "Error: LUA interpreter and libraries not found (or inconsistent versions)"
	return -1

endif

install:
	$(INSTALLDIR) $(DESTDIR)$(BINDIR)
	$(INSTALL) -m $(BIN_MODE) libextl-mkexports $(DESTDIR)$(BINDIR)
	$(INSTALLDIR) $(DESTDIR)$(LIBDIR)
	$(INSTALL) -m $(DATA_MODE) libextl.a $(DESTDIR)$(LIBDIR)
	$(INSTALLDIR) $(DESTDIR)$(INCDIR)
	for h in $(HEADERS); do \
		$(INSTALL) -m $(DATA_MODE) $$h $(DESTDIR)$(INCDIR); \
	done

test:
	$(MAKE) -C test test