aboutsummaryrefslogtreecommitdiff
blob: f31969d08f1de65a85751f46550d9ba1cb1b9079 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
Index: src/Makefile.am
===================================================================
--- src/Makefile.am	(wersja 129)
+++ src/Makefile.am	(kopia robocza)
@@ -23,11 +23,12 @@
   LIBFUNCMOD = cl.@ax_cv_f90_modext@
 endif
 
-nodist_include_HEADERS = $(LIBFUNCMOD)
+fortrancl_includedir = $(includedir)/fortrancl
+nodist_fortrancl_include_HEADERS = $(LIBFUNCMOD)
 
-lib_LIBRARIES = libfortrancl.a
+lib_LTLIBRARIES = libfortrancl.la
 
-libfortrancl_a_SOURCES =       \
+libfortrancl_la_SOURCES =       \
 	cl_types.f90           \
 	cl_buffer.f90          \
 	cl_command_queue.f90   \
@@ -39,7 +40,7 @@
 	cl_program.f90         \
 	cl.f90
 
-libfortrancl_a_SOURCES +=            \
+libfortrancl_la_SOURCES +=            \
 	cl_buffer_low.c              \
 	cl_command_queue_low.c       \
 	cl_context_low.c             \
@@ -51,15 +52,17 @@
 noinst_HEADERS =               \
 	string_f.h
 
-cl_types.o     : cl_types.f90 
-cl_constants.o : cl_constants.f90
-cl_platform.o  : cl_platform.f90 cl_types.o 
-cl_program.o   : cl_program.f90 cl_types.o 
-cl_kernel.o    : cl_kernel.f90 cl_types.o 
-cl_device.o    : cl_device.f90 cl_types.o 
-cl_context.o   : cl_context.f90 cl_types.o 
-cl_command_queue.o : cl_command_queue.f90 cl_types.o 
-cl_buffer.o    : cl_buffer.f90  cl_types.o 
-cl.o : cl.f90 cl_constants.o cl_types.o cl_device.o cl_kernel.o cl_program.o cl_platform.o cl_context.o cl_command_queue.o cl_buffer.o
+$(LIBFUNCMOD):   cl.lo
 
+cl_types.lo     : cl_types.f90 
+cl_constants.lo : cl_constants.f90
+cl_platform.lo  : cl_platform.f90 cl_types.lo 
+cl_program.lo   : cl_program.f90 cl_types.lo 
+cl_kernel.lo    : cl_kernel.f90 cl_types.lo 
+cl_device.lo    : cl_device.f90 cl_types.lo 
+cl_context.lo   : cl_context.f90 cl_types.lo 
+cl_command_queue.lo : cl_command_queue.f90 cl_types.lo 
+cl_buffer.lo    : cl_buffer.f90  cl_types.lo 
+cl.lo : cl.f90 cl_constants.lo cl_types.lo cl_device.lo cl_kernel.lo cl_program.lo cl_platform.lo cl_context.lo cl_command_queue.lo cl_buffer.lo
+
 CLEANFILES = *~ *.bak *.mod *.MOD *.il *.d *.pc* ifc*
Index: configure.ac
===================================================================
--- configure.ac	(wersja 129)
+++ configure.ac	(kopia robocza)
@@ -32,11 +32,16 @@
 AC_PROG_INSTALL
 AC_PROG_LN_S
 AC_PROG_MAKE_SET
-AC_PROG_RANLIB
 AC_PROG_YACC
 
 AC_PROG_CC
+LT_INIT([disable-static])
 
+# Set proper version
+# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
+AC_SUBST([FORTRANCL_SO_VERSION], [0:0:0])
+#AC_SUBST([FORTRANCL_API_VERSION], [1.1])   # set to proper API OpenCL version
+
 # Checks for header files.
 AC_HEADER_STDC
 
@@ -73,8 +78,9 @@
 AC_SUBST(ax_cv_f90_modext)
 AM_CONDITIONAL(F90_MOD_UPPERCASE, [test x$ax_f90_mod_uppercase = xyes])
 
-AC_CONFIG_FILES([Makefile])
-AC_CONFIG_FILES([src/Makefile])
-AC_CONFIG_FILES([examples/Makefile])
+AC_CONFIG_FILES([Makefile
+                 src/Makefile
+                 examples/Makefile
+                 fortrancl.pc])
 
 AC_OUTPUT
Index: fortrancl.pc.in
===================================================================
--- fortrancl.pc.in	(wersja 0)
+++ fortrancl.pc.in	(kopia robocza)
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: @PACKAGE_NAME@
+Description: OpenCL interface for Fortran 90
+Version: @PACKAGE_VERSION@
+URL: @PACKAGE_URL@
+Libs: -L${libdir} -lfortrancl
+Cflags: -I${includedir}/fortrancl
Index: Makefile.am
===================================================================
--- Makefile.am	(wersja 129)
+++ Makefile.am	(kopia robocza)
@@ -17,6 +17,12 @@
 ##
 ## $Id$
 
+ACLOCAL_AMFLAGS = -I m4
+
 SUBDIRS = src examples
 
-CLEANFILES = *~ *.bak *.mod *.MOD *.il *.d *.pc* ifc*
+CLEANFILES = *~ *.bak *.mod *.MOD *.il *.d *.pc ifc*
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = fortrancl.pc
+
Index: examples/Makefile.am
===================================================================
--- examples/Makefile.am	(wersja 129)
+++ examples/Makefile.am	(kopia robocza)
@@ -20,11 +20,11 @@
 noinst_PROGRAMS = sum devices
 
 sum_SOURCES = sum.f90
-sum_LDADD = $(top_builddir)/src/libfortrancl.a
+sum_LDADD = $(top_builddir)/src/libfortrancl.la
 dist_noinst_DATA = sum.cl
 
 devices_SOURCES = devices.f90
-devices_LDADD = $(top_builddir)/src/libfortrancl.a
+devices_LDADD = $(top_builddir)/src/libfortrancl.la
 
 AM_FCFLAGS = @F90_MODULE_FLAG@$(top_builddir)/src