Commits

Toby Inkster committed 97aefe8 Draft

Comments (0)

Files changed (1)

-all: libgreeter.so 
+greeter.o: greeter.adb greeter.ads
+	gcc-4.4 -c -fPIC greeter.adb
 
-libgreeter.so: greeter.o
-	gcc -shared -o libgreeter.so greeter.o
+greeter.ali: greeter.adb greeter.ads
+	gcc-4.4 -c -fPIC greeter.adb
 
-greeter.o: greeter.adb greeter.ads
-	gnatmake -z -fPIC greeter.adb
+b~greeter.adb: greeter.o greeter.ali
+	gnatbind -Lgreeter greeter
+
+b~greeter.ads: greeter.o greeter.ali
+	gnatbind -Lgreeter greeter
+
+b_greeter.c: b~greeter.adb b~greeter.ads
+	gnatbind -C -Lmylib interface
+
+b~greeter.o: b~greeter.adb
+	gcc-4.4 -c -fPIC b~greeter.adb
+
+b~greeter.ali: b~greeter.adb
+	gcc-4.4 -c -fPIC b~greeter.adb
+
+libgreeter.a: b~greeter.o
+	ar cr libgreeter.a b~greeter.o
+
+libgreeter.so: b~greeter.o
+	gcc -shared -o libgreeter.so b~greeter.o
+
+all: libgreeter.a libgreeter.so 
 
 clean:
-	rm -rf greeter.ali greeter.o greeter libgreeter.so 
+	rm -rf b_greeter.* b~greeter.* *.o *.so *.a *.ali
 
-test: libgreeter.so greeter.pl
+test: libgreeter.so libgreeter.a greeter.pl
 	perl greeter.pl