File: Makefile

package info (click to toggle)
twin 0.4.0-4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 3,804 kB
  • ctags: 23,904
  • sloc: ansic: 61,860; cpp: 1,023; makefile: 777; sh: 552; lex: 302; yacc: 231
file content (102 lines) | stat: -rw-r--r-- 2,345 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#
# Makefile for libTT, `The Text Toolkit' library sitting on top of libTw
#
TOPDIR=../..
SUBDIRS=

all: everything

VERSION=0.0.3
SO_VER=0

BINS=libTT.so.$(VERSION)
ARLIBS=libTT.a


OBJS_libTT.so.$(VERSION)=libTT.o missing.o
OBJS_libTT.a=libTT_u.o missing_u.o

CC_FLAGS_libTT.o+=-fPIC -D_REENTRANT
CC_FLAGS_missing.o+=-fPIC -D_REENTRANT
CC_FLAGS_libTT_u.o+=-D_REENTRANT
CC_FLAGS_missing_u.o+=-D_REENTRANT

LD_FLAGS_libTT.so.$(VERSION)=$(LIBTW) $(LD_FLAGS_SOLIB)libTT.so.$(SO_VER)

-include $(TOPDIR)/conf/conf.current
-include .modules
-include .depend

ifneq ($(CONF_SOCKET),n)
  everything: lib
  install: install-real
  ifeq ($(CONF__UNICODE),y)
    LD_FLAGS_libTT.so.$(VERSION)+=$(LIBTUTF)
  endif
else
  everything: warn
  install: warn
  warn:
	@$(ECHO) ; \
	 $(ECHO) "You disabled \"Support remote socket connections\"," ; \
	 $(ECHO) "so the library libTT.so will NOT be compiled!" ; \
	 $(ECHO)
endif

#
# include the do-everything file.
# Must correctly set all CC_FLAGS* and LD_FLAGS* before including this!
#
include $(TOPDIR)/makerules


#
# handy targets
#
ifeq ($(CONF__SHLIBS),y)
  lib: $(ARLIBS) $(BINS) links
else
  lib: $(ARLIBS)
	@$(ECHO) ; \
	 $(ECHO) "You disabled \"Enable shared libraries (ELF)\"," ; \
	 $(ECHO) "so only the static library libTT.a will be compiled!" ; \
	 $(ECHO)
endif

autogen: methodsm4.h TTm4.h

methodsm4.h: methods_base.h

missing.c missing_u.c:
	$(LN) $(TOPDIR)/server/missing.c missing.c && \
	$(LN) $(TOPDIR)/server/missing.c missing_u.c

links: libTT.so.$(SO_VER) libTT.so

libTT.so.$(SO_VER):
	$(LN) libTT.so.$(VERSION) libTT.so.$(SO_VER)

libTT.so:
	$(LN) libTT.so.$(SO_VER) libTT.so

libTT_u.c:
	$(LN) libTT.c libTT_u.c

install-headers:
	$(INSTALL) -d $(DESTDIR)$(includedir)/TT && \
	$(INSTALL-TXT) $(TOPDIR)/include/TT/*.h $(DESTDIR)$(includedir)/TT && \
	$(LN) TT/TT++.h $(DESTDIR)$(includedir)/libTT++.h && \
	$(LN) TT/TT.h $(DESTDIR)$(includedir)/libTT.h

install-real: install-headers
	$(INSTALL) -d $(DESTDIR)$(libdir) && \
	$(INSTALL-TXT) $(ARLIBS) $(DESTDIR)$(libdir) && \
	if [ -f libTT.so.$(VERSION) ]; then \
		$(INSTALL) libTT.so.$(VERSION) $(DESTDIR)$(libdir) && \
		$(LN) libTT.so.$(VERSION) $(DESTDIR)$(libdir)/libTT.so.$(SO_VER) && \
		$(LN) libTT.so.$(SO_VER)  $(DESTDIR)$(libdir)/libTT.so; \
	fi
	
clean:
	rm -f .*.flags .*.link .*.arlib libTT.so* libTT.a $(_ALLOBJS)