2013-03-07 11:45:28 +01:00
|
|
|
[PATCH] Make the UTF16 support configurable
|
2013-03-07 11:45:23 +01:00
|
|
|
|
2013-03-07 11:45:28 +01:00
|
|
|
libicu is quite large, and unicode partition names are uncommon, so we
|
|
|
|
may not necessarily want to have UTF16 support unconditionnally. This
|
|
|
|
patch adds a USE_UTF16 environment variable to tell whether we want
|
|
|
|
the UTF16 support or not.
|
2013-03-07 11:45:23 +01:00
|
|
|
|
|
|
|
Signed-off-by: Justin Maggard <jmaggard10@gmail.com>
|
2013-03-07 11:45:28 +01:00
|
|
|
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
2014-11-25 12:57:06 +01:00
|
|
|
[baruch: add $(LDLIBS)]
|
|
|
|
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
|
2013-03-07 11:45:23 +01:00
|
|
|
---
|
2013-03-07 11:45:28 +01:00
|
|
|
Index: b/Makefile
|
|
|
|
===================================================================
|
|
|
|
--- a/Makefile
|
|
|
|
+++ b/Makefile
|
|
|
|
@@ -1,8 +1,11 @@
|
2013-03-07 11:45:23 +01:00
|
|
|
CC=gcc
|
|
|
|
CXX=g++
|
|
|
|
CFLAGS+=-D_FILE_OFFSET_BITS=64
|
|
|
|
-CXXFLAGS+=-Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16
|
|
|
|
-#CXXFLAGS+=-Wall -D_FILE_OFFSET_BITS=64
|
|
|
|
+CXXFLAGS+=-Wall -D_FILE_OFFSET_BITS=64
|
2013-03-07 11:45:28 +01:00
|
|
|
+ifeq ($(USE_UTF16),y)
|
|
|
|
+CXXFLAGS+=-D USE_UTF16
|
|
|
|
+UTF16_LIBS=-licuio -licuuc
|
|
|
|
+endif
|
2013-03-07 11:45:23 +01:00
|
|
|
LDFLAGS+=
|
|
|
|
LIB_NAMES=crc32 support guid gptpart mbrpart basicmbr mbr gpt bsd parttypes attributes diskio diskio-unix
|
|
|
|
MBR_LIBS=support diskio diskio-unix basicmbr mbrpart
|
2013-03-07 11:45:28 +01:00
|
|
|
@@ -14,16 +17,13 @@
|
2013-03-07 11:45:23 +01:00
|
|
|
all: cgdisk gdisk sgdisk fixparts
|
|
|
|
|
|
|
|
gdisk: $(LIB_OBJS) gdisk.o gpttext.o
|
|
|
|
-# $(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) -luuid -o gdisk
|
|
|
|
- $(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) -licuio -licuuc -luuid -o gdisk
|
2014-11-25 12:57:06 +01:00
|
|
|
+ $(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) $(UTF16_LIBS) -luuid $(LDLIBS) -o gdisk
|
2013-03-07 11:45:23 +01:00
|
|
|
|
|
|
|
cgdisk: $(LIB_OBJS) cgdisk.o gptcurses.o
|
|
|
|
-# $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) -luuid -lncurses -o cgdisk
|
|
|
|
- $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) -licuio -licuuc -luuid -lncurses -o cgdisk
|
2014-11-25 12:57:06 +01:00
|
|
|
+ $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) $(UTF16_LIBS) -luuid -lncurses $(LDLIBS) -o cgdisk
|
2013-03-07 11:45:23 +01:00
|
|
|
|
|
|
|
sgdisk: $(LIB_OBJS) sgdisk.o gptcl.o
|
|
|
|
-# $(CXX) $(LIB_OBJS) sgdisk.o gptcl.o $(LDFLAGS) -luuid -lpopt -o sgdisk
|
|
|
|
- $(CXX) $(LIB_OBJS) sgdisk.o gptcl.o $(LDFLAGS) -licuio -licuuc -luuid -lpopt -o sgdisk
|
2014-11-25 12:57:06 +01:00
|
|
|
+ $(CXX) $(LIB_OBJS) sgdisk.o gptcl.o $(LDFLAGS) $(UTF16_LIBS) -luuid -lpopt $(LDLIBS) -o sgdisk
|
2013-03-07 11:45:23 +01:00
|
|
|
|
|
|
|
fixparts: $(MBR_LIB_OBJS) fixparts.o
|
|
|
|
$(CXX) $(MBR_LIB_OBJS) fixparts.o $(LDFLAGS) -o fixparts
|