added H2.Wide.

did some makefile experiments
This commit is contained in:
hyung-hwan 2014-01-17 14:15:08 +00:00
parent d1af233db4
commit 55441b4451
4 changed files with 74 additions and 6 deletions

View File

@ -1,11 +1,10 @@
with H2.Scheme;
with H2.Utf8;
with H2.Wide;
with Ada.Wide_Text_IO;
package Stream is
package S is new H2.Scheme (Standard.Wide_Character);
package Utf8 is new H2.Utf8 (Standard.Character, Standard.Wide_Character);
package S renames H2.Wide.Scheme;
package Utf8 renames H2.Wide.Utf8;
------------------------------------------------------------
--type Object_Character_Array_Pointer is access all S.Object_Character_Array;

View File

@ -22,3 +22,61 @@ clean:
distclean: clean
ADAFLAGS := -gnatA -fPIC -gnata -gnato -gnatN -gnatwl -lgnat95 -gnatW8 -g
BINDFLAGS := -x -shared
SRCS := h2.ads h2-ascii.ads h2-pool.adb h2-scheme.adb h2-utf8.adb h2-wide.ads
ALIS := $(patsubst %.ads,%.ali,$(patsubst %.adb,%.ali,$(SRCS)))
OBJS := $(ALIS:.ali=.o)
BINDALI := b~h2.adb
libh2: $(ALIS) $(BINDALI)
gnatbind ${BINDFLAGS} -o b~h2.adb -n -Lh2 $(ALIS)
gcc -c -x ada ${ADAFLAGS} b~h2.adb
gcc -shared -o libh2.so $(OBJS) b~h2.o -L. -lgnat
# gcc -c -x ada ${ADAFLAGS} ../../lib/h2.ads
# gcc -c -x ada ${ADAFLAGS} ../../lib/h2-ascii.ads
# gcc -c -x ada ${ADAFLAGS} ../../lib/h2-pool.adb
# gcc -c -x ada ${ADAFLAGS} ../../lib/h2-scheme.adb
# gcc -c -x ada ${ADAFLAGS} ../../lib/h2-utf8.adb
# gcc -c -x ada ${ADAFLAGS} ../../lib/h2-wide.ads
# gnatbind ${BINDFLAGS} -o b~h2.adb -n -Lh2 h2.ali h2-ascii.ali h2-pool.ali h2-scheme.ali h2-utf8.ali h2-wide.ali
# #gnatbind ${BINDFLAGS} -C -o b~h2.c -n -Lh2 h2.ali h2-scheme.ali h2-pool.ali #for a show
# gcc -c -x ada ${ADAFLAGS} b~h2.adb
# gcc -shared -o libh2.so h2.o h2-ascii.o h2-pool.o h2-scheme.o h2-utf8.o h2-wide.o b~h2.o -L. -lgnat
# #gnatlink -v -v -olibh2.so h2
#h2cmd:
# gcc -c -x ada ${ADAFLAGS} -I../../lib ../../cmd/storage.adb
# gcc -c -x ada ${ADAFLAGS} -I../../lib ../../cmd/stream.adb
# gcc -c -x ada ${ADAFLAGS} -I../../lib ../../cmd/scheme.adb
# gnatbind ${BINDFLAGS} -o b~scheme.adb scheme.ali storage.ali #-I- -I. -O
# gcc -c -x ada ${ADAFLAGS} b~scheme.adb
# gcc -oh2scm b~scheme.o storage.o stream.o scheme.o -L. -lh2 -Wl,-rpath=. #-lgnat-4.1
# #gnatlink -v -v -o h2scm scheme
# #/usr/bin/gnatbind -x -shared -o b__scheme.adb ./scheme.ali ./storage.ali -I- -I. -I../lib/objdir -O
# #gcc -c -x ada -gnatA -gnata -gnato -gnatN -gnatwl -c -gnatA -gnatWb -gnatiw -gnatws b__scheme.adb -o b__scheme.o
# #gcc -oh2scm scheme.o b__scheme.o storage.o -shared-libgcc -L../lib -lh2 -Wl,-rpath=../lib -L -lgna
#.SUFFIXES: .ads .adb .ali
#.ads.ali:
# gcc -c -x ada ${ADAFLAGS} @abs_srcdir@/$<
#
#.adb.ali:
# gcc -c -x ada ${ADAFLAGS} @abs_srcdir@/$<
$(BINDALI):
%.ali: @abs_srcdir@/%.adb
gcc -c -x ada ${ADAFLAGS} $<
%.ali: @abs_srcdir@/%.ads
gcc -c -x ada ${ADAFLAGS} $<

9
lib/h2-wide.ads Normal file
View File

@ -0,0 +1,9 @@
with H2.Scheme;
with H2.Utf8;
package H2.Wide is
package Scheme is new H2.Scheme (Standard.Wide_Character);
package Utf8 is new H2.Utf8 (Standard.Character, Standard.Wide_Character);
end H2.Wide;

View File

@ -17,14 +17,16 @@ project Lib is
"h2-scheme-execute.adb",
"h2-scheme-token.adb",
"h2-utf8.adb",
"h2-utf8.ads"
"h2-utf8.ads",
"h2-wide.ads"
);
for Library_Interface use (
"h2",
"h2.ascii",
"h2.pool",
"h2.scheme",
"h2.utf8"
"h2.utf8",
"h2.wide"
);
package Compiler is