1# Makefile for libcharset/lib
2
3#### Start of system configuration section. ####
4
5# Directories used by "make":
6srcdir = .
7
8# Directories used by "make install":
9prefix = /usr
10local_prefix = /usr/local
11exec_prefix = ${prefix}
12libdir = ${exec_prefix}/lib
13
14# Programs used by "make":
15CC = arm-brcm-linux-uclibcgnueabi-gcc
16CFLAGS = -Os -O2 -DBCMWPA2 -DRESTART_ALL_PROCESSES -D__CONFIG_USBAP__ -DBCMQOS -DBCMWPS -D__CONFIG_EMF__ -DTRAFFIC_MGMT -DPHYMON -DSUPPORT_REMOTE_HTTPS -DINCLUDE_WPS_V20 -DINCLUDE_5G_AUTO_CHANNEL -DOPENDNS_PARENTAL_CONTROL -DINCLUDE_UCP -DU12H240 -DR6300v2 -DMULTIPLE_SSID -DENABLE_ML -DBCM53125 -DBCM5301X -DCONFIG_RUSSIA_IPTV -DDLNA -DHTTP_ACCESS_USB -DMAX_USB_ACCESS -DSAMBA_ENABLE -DUSB_NEW_SPEC -DINCLUDE_WIFI_BUTTON -DINCLUDE_USB_LED -DINCLUDE_DUAL_BAND -DSINGLE_FIRMWARE -DINCLUDE_GET_ST_CHKSUM -DUNIFIED_STR_TBL -DFIRST_MTD_ROTATION -DWIFI_ON_OFF_SCHE -DAUTO_CONN_24HR -DIGMP_PROXY -DAP_MODE -D__CONFIG_IGMP_SNOOPING__ -DLINUX26 -DINCLUDE_IPV6 -DPRESET_WL_SECURITY -DNEW_BCM_WPS_IPC -DSUPPORT_AC_MODE -DSTA_MODE -DPPP_RU_DESIGN -DEXT_ACS -D__CONFIG_PLC__ -D__CONFIG_URE__ -DPLC -DWPS_LONGPUSH_DISABLE -Os -DLINUX26 -DCONFIG_KERNEL_2_6_36 -I$(SRC_PATH)/build/include
17CPPFLAGS = -I$(SRC_PATH)/build/include
18LDFLAGS = -L$(SRC_PATH)/build/lib
19INCLUDES = -I. -I$(srcdir) -I.. -I$(srcdir)/.. -I../include
20DEFS = -DLIBDIR=\"$(libdir)\" \
21-DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(libdir)\" -DNO_XMALLOC \
22-Dset_relocation_prefix=libcharset_set_relocation_prefix \
23-Drelocate=libcharset_relocate -DHAVE_CONFIG_H
24LIBTOOL = $(SHELL) $(top_builddir)/libtool
25LIBTOOL_COMPILE = $(LIBTOOL) --mode=compile
26LIBTOOL_LINK = $(LIBTOOL) --mode=link
27LIBTOOL_INSTALL = $(LIBTOOL) --mode=install
28LIBTOOL_UNINSTALL = $(LIBTOOL) --mode=uninstall
29RM = rm -f
30
31# Programs used by "make install":
32INSTALL = /usr/bin/install -c
33INSTALL_DATA = ${INSTALL} -m 644
34mkinstalldirs = $(SHELL) ../build-aux/mkinstalldirs
35
36#### End of system configuration section. ####
37
38PACKAGE = 
39VERSION = 
40
41SHELL = /bin/sh
42
43# Before making a release, change this according to the libtool documentation,
44# section "Library interface versions".
45LIBCHARSET_VERSION_INFO = 1:0:0
46
47# Needed by $(LIBTOOL).
48top_builddir = ..
49
50SOURCES = $(srcdir)/localcharset.c $(srcdir)/relocatable.c
51
52OBJECTS = localcharset.lo relocatable.lo
53
54all : libcharset.la charset.alias ref-add.sed ref-del.sed
55
56libcharset.la : $(OBJECTS)
57	$(LIBTOOL_LINK) $(CC) $(LDFLAGS) -o libcharset.la -rpath $(libdir) -version-info $(LIBCHARSET_VERSION_INFO) -no-undefined $(OBJECTS)
58
59localcharset.lo : $(srcdir)/localcharset.c
60	$(LIBTOOL_COMPILE) $(CC) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -c $(srcdir)/localcharset.c
61
62relocatable.lo : $(srcdir)/relocatable.c $(srcdir)/relocatable.h
63	$(LIBTOOL_COMPILE) $(CC) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -c $(srcdir)/relocatable.c
64
65charset.alias: $(srcdir)/config.charset
66	$(SHELL) $(srcdir)/config.charset 'arm-unknown-linux-gnu' > t-$@
67	mv t-$@ $@
68
69ref-add.sed : $(srcdir)/ref-add.sin
70	sed -e '/^#/d' -e 's/@''PACKAGE''@//g' $(srcdir)/ref-add.sin > t-$@
71	mv t-$@ $@
72
73ref-del.sed : $(srcdir)/ref-del.sin
74	sed -e '/^#/d' -e 's/@''PACKAGE''@//g' $(srcdir)/ref-del.sin > t-$@
75	mv t-$@ $@
76
77# Installs the library and include files only. Typically called with only
78# $(libdir) and $(includedir) - don't use $(prefix) and $(exec_prefix) here.
79install-lib : all force
80	$(mkinstalldirs) $(libdir)
81	$(LIBTOOL_INSTALL) $(INSTALL_DATA) libcharset.la $(libdir)/libcharset.la
82	test -f $(libdir)/charset.alias && orig=$(libdir)/charset.alias \
83	                                || orig=charset.alias; \
84	sed -f ref-add.sed $$orig > $(libdir)/t-charset.alias; \
85	$(INSTALL_DATA) $(libdir)/t-charset.alias $(libdir)/charset.alias; \
86	rm -f $(libdir)/t-charset.alias
87
88# The following is needed in order to install a simple file in $(libdir)
89# which is shared with other installed packages. We use a list of referencing
90# packages so that "make uninstall" will remove the file if and only if it
91# is not used by another installed package.
92# On systems with glibc-2.1 or newer, the file is redundant, therefore we
93# avoid installing it.
94
95install : all force
96	$(mkinstalldirs) $(DESTDIR)$(libdir)
97	$(LIBTOOL_INSTALL) $(INSTALL_DATA) libcharset.la $(DESTDIR)$(libdir)/libcharset.la
98	if test -f $(DESTDIR)$(libdir)/charset.alias; then \
99	  sed -f ref-add.sed $(DESTDIR)$(libdir)/charset.alias > $(DESTDIR)$(libdir)/t-charset.alias; \
100	  $(INSTALL_DATA) $(DESTDIR)$(libdir)/t-charset.alias $(DESTDIR)$(libdir)/charset.alias; \
101	  rm -f $(DESTDIR)$(libdir)/t-charset.alias; \
102	else \
103	  if test yes = no; then \
104	    sed -f ref-add.sed charset.alias > $(DESTDIR)$(libdir)/t-charset.alias; \
105	    $(INSTALL_DATA) $(DESTDIR)$(libdir)/t-charset.alias $(DESTDIR)$(libdir)/charset.alias; \
106	    rm -f $(DESTDIR)$(libdir)/t-charset.alias; \
107	  fi ; \
108	fi
109
110installdirs : force
111	$(mkinstalldirs) $(DESTDIR)$(libdir)
112
113uninstall : force
114	$(LIBTOOL_UNINSTALL) $(RM) $(DESTDIR)$(libdir)/libcharset.la
115	if test -f $(DESTDIR)$(libdir)/charset.alias; then \
116	  sed -f ref-del.sed $(DESTDIR)$(libdir)/charset.alias > $(DESTDIR)$(libdir)/t-charset.alias; \
117	  if grep '^# Packages using this file: $$' $(DESTDIR)$(libdir)/t-charset.alias > /dev/null; then \
118	    rm -f $(DESTDIR)$(libdir)/charset.alias; \
119	  else \
120	    $(INSTALL_DATA) $(DESTDIR)$(libdir)/t-charset.alias $(DESTDIR)$(libdir)/charset.alias; \
121	  fi; \
122	  rm -f $(DESTDIR)$(libdir)/t-charset.alias; \
123	fi
124
125check : all
126
127mostlyclean : clean
128
129clean : force
130	$(RM) *.o *.lo *.a *.la *.o.lock core charset.alias ref-add.sed ref-del.sed
131	$(RM) -r .libs _libs
132
133distclean : clean
134	$(RM) config.status config.log config.cache Makefile libtool
135
136maintainer-clean : distclean
137
138force :
139
140