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 (98 lines) | stat: -rw-r--r-- 2,140 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
#
# Makefile for libTutf, the UTF-16 charset conversion library
#
TOPDIR=../..
SUBDIRS=

all: everything

VERSION=0.0.3
SO_VER=0

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

OBJS_libTutf.so.$(VERSION)=libTutf.o
OBJS_libTutf.a=libTutf_u.o

CC_FLAGS_libTutf.o+=-fPIC -D_REENTRANT
CC_FLAGS_libTutf_u.o+=-D_REENTRANT

LD_FLAGS_libTutf.so.$(VERSION)=$(LD_FLAGS_SOLIB)libTutf.so.$(SO_VER)

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


ifneq ($(CONF_SOCKET),n)
  ifeq ($(CONF__UNICODE),y)
    everything: lib
    install: install-real
  else
    everything install:
	@$(ECHO) ; \
	 $(ECHO) "You disabled \"Build all code with Unicode support\"," ; \
	 $(ECHO) "so the library libTutf will NOT be compiled!" ; \
	 $(ECHO)
  endif
else
  everything install:
	@$(ECHO) ; \
	 $(ECHO) "You disabled \"Support remote socket connections\"," ; \
	 $(ECHO) "so the library libTw.so will NOT be compiled!" ; \
	 $(ECHO)
endif

#
# 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 libTutf.a will be compiled!" ; \
	 $(ECHO)
endif


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



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

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

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

libTutf_u.c:
	$(LN) libTutf.c libTutf_u.c

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

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