OSDN Git Service

Fix a few bugs in the new extended locale functions.
[uclinux-h8/uClibc.git] / libc / misc / locale / Makefile
index 8ad041e..17b208b 100644 (file)
@@ -36,18 +36,14 @@ ifeq ($(UCLIBC_HAS_XLOCALE),y)
        MOBJx += nl_langinfo_l.o duplocale.o freelocale.o uselocale.o __curlocale.o
 endif
 
-OBJS= $(MOBJ) $(MOBJx)
-
-ifeq ($(UCLIBC_HAS_LOCALE),y)
-       OBJS += $(COBJS) locale_data.o
-endif
-
 DATA=
 ifeq ($(UCLIBC_HAS_LOCALE),y)
-       DATA += locale_data.o
+       DATA = locale_data.o
 endif
 
-all: $(DATA) $(OBJS) $(LIBC)
+OBJS= $(MOBJ) $(MOBJx) $(DATA)
+
+all: $(OBJS) $(LIBC)
 
 
 $(LIBC): ar-target
@@ -63,12 +59,14 @@ $(MOBJx): $(MSRC)
        $(CC) $(CFLAGS) -DL_$* -D__UCLIBC_DO_XLOCALE $< -c -o $*.o
        $(STRIPTOOL) -x -R .note -R .comment $*.o
 
-$(OBJS): Makefile
+locale_data.o:
+       ln -sf ../../../extra/locale/locale_data.c
+       $(CC) $(CFLAGS) -c -D__WCHAR_ENABLED -I../../../extra/locale locale_data.c -o $@
+       $(STRIPTOOL) -x -R .note -R .comment $*.o
 
-# locale_data.o:
-#      make -C $(TOPDIR)/extra/locale
+$(OBJS): Makefile
 
 clean:
-       rm -f *.[oa] *~ core
+       rm -f *.[oa] *~ core locale_data.c
 
 .PHONY: data