summaryrefslogtreecommitdiff
path: root/libc/misc/locale/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'libc/misc/locale/Makefile')
-rw-r--r--libc/misc/locale/Makefile22
1 files changed, 10 insertions, 12 deletions
diff --git a/libc/misc/locale/Makefile b/libc/misc/locale/Makefile
index 8ad041e69..17b208b2e 100644
--- a/libc/misc/locale/Makefile
+++ b/libc/misc/locale/Makefile
@@ -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