11 # ---------------------------------------------------------------------------------------------------------------------
15 SRATOM_VERSION
= 0.6.0
18 # ---------------------------------------------------------------------------------------------------------------------
20 BUILD_C_FLAGS
+= $(LILV_FLAGS
) -Iconfig
-w
22 # ---------------------------------------------------------------------------------------------------------------------
24 OBJS
= $(OBJDIR
)/serd.c.o
$(OBJDIR
)/sord.c.o
$(OBJDIR
)/sratom.c.o
$(OBJDIR
)/lilv.c.o
25 OBJS_arm32
= $(OBJDIR
)/serd.c.arm32.o
$(OBJDIR
)/sord.c.arm32.o
$(OBJDIR
)/sratom.c.arm32.o
$(OBJDIR
)/lilv.c.arm32.o
26 OBJS_posix32
= $(OBJDIR
)/serd.c.posix32.o
$(OBJDIR
)/sord.c.posix32.o
$(OBJDIR
)/sratom.c.posix32.o
$(OBJDIR
)/lilv.c.posix32.o
27 OBJS_posix64
= $(OBJDIR
)/serd.c.posix64.o
$(OBJDIR
)/sord.c.posix64.o
$(OBJDIR
)/sratom.c.posix64.o
$(OBJDIR
)/lilv.c.posix64.o
28 OBJS_win32
= $(OBJDIR
)/serd.c.win32.o
$(OBJDIR
)/sord.c.win32.o
$(OBJDIR
)/sratom.c.win32.o
$(OBJDIR
)/lilv.c.win32.o
29 OBJS_win64
= $(OBJDIR
)/serd.c.win64.o
$(OBJDIR
)/sord.c.win64.o
$(OBJDIR
)/sratom.c.win64.o
$(OBJDIR
)/lilv.c.win64.o
31 # ---------------------------------------------------------------------------------------------------------------------
33 all: $(MODULEDIR
)/$(MODULENAME
).a
34 arm32
: $(MODULEDIR
)/$(MODULENAME
).arm32.a
35 posix32
: $(MODULEDIR
)/$(MODULENAME
).posix32.a
36 posix64
: $(MODULEDIR
)/$(MODULENAME
).posix64.a
37 win32
: $(MODULEDIR
)/$(MODULENAME
).win32.a
38 win64
: $(MODULEDIR
)/$(MODULENAME
).win64.a
40 # ---------------------------------------------------------------------------------------------------------------------
43 rm -f
$(OBJDIR
)/*.o
$(MODULEDIR
)/$(MODULENAME
)*.a
48 # ---------------------------------------------------------------------------------------------------------------------
50 $(MODULEDIR
)/$(MODULENAME
).a
: $(OBJS
)
51 -@mkdir
-p
$(MODULEDIR
)
52 @echo
"Creating $(MODULENAME).a"
54 $(SILENT
)$(AR
) crs
$@
$^
56 $(MODULEDIR
)/$(MODULENAME
).arm32.a
: $(OBJS_arm32
)
57 -@mkdir
-p
$(MODULEDIR
)
58 @echo
"Creating $(MODULENAME).arm32.a"
60 $(SILENT
)$(AR
) crs
$@
$^
62 $(MODULEDIR
)/$(MODULENAME
).posix32.a
: $(OBJS_posix32
)
63 -@mkdir
-p
$(MODULEDIR
)
64 @echo
"Creating $(MODULENAME).posix32.a"
66 $(SILENT
)$(AR
) crs
$@
$^
68 $(MODULEDIR
)/$(MODULENAME
).posix64.a
: $(OBJS_posix64
)
69 -@mkdir
-p
$(MODULEDIR
)
70 @echo
"Creating $(MODULENAME).posix64.a"
72 $(SILENT
)$(AR
) crs
$@
$^
74 $(MODULEDIR
)/$(MODULENAME
).win32.a
: $(OBJS_win32
)
75 -@mkdir
-p
$(MODULEDIR
)
76 @echo
"Creating $(MODULENAME).win32.a"
78 $(SILENT
)$(AR
) crs
$@
$^
80 $(MODULEDIR
)/$(MODULENAME
).win64.a
: $(OBJS_win64
)
81 -@mkdir
-p
$(MODULEDIR
)
82 @echo
"Creating $(MODULENAME).win64.a"
84 $(SILENT
)$(AR
) crs
$@
$^
86 # ---------------------------------------------------------------------------------------------------------------------
88 $(OBJDIR
)/serd.c.o
: serd.c
91 $(SILENT
)$(CC
) $< $(BUILD_C_FLAGS
) -Iserd-
$(SERD_VERSION
) -c
-o
$@
93 $(OBJDIR
)/serd.c.
%32.o
: serd.c
95 @echo
"Compiling $< (32bit)"
96 $(SILENT
)$(CC
) $< $(BUILD_C_FLAGS
) -Iserd-
$(SERD_VERSION
) $(32BIT_FLAGS
) -c
-o
$@
98 $(OBJDIR
)/serd.c.
%64.o
: serd.c
100 @echo
"Compiling $< (64bit)"
101 $(SILENT
)$(CC
) $< $(BUILD_C_FLAGS
) -Iserd-
$(SERD_VERSION
) $(64BIT_FLAGS
) -c
-o
$@
103 $(OBJDIR
)/serd.c.arm32.o
: serd.c
105 @echo
"Compiling $< (ARM32)"
106 $(SILENT
)$(CC
) $< $(BUILD_C_FLAGS
) -Iserd-
$(SERD_VERSION
) $(ARM32_FLAGS
) -c
-o
$@
108 # ---------------------------------------------------------------------------------------------------------------------
110 $(OBJDIR
)/sord.c.o
: sord.c
113 $(SILENT
)$(CC
) $< $(BUILD_C_FLAGS
) -Isord-
$(SORD_VERSION
) -Isord-
$(SORD_VERSION
)/src
-fno-strict-aliasing
-c
-o
$@
115 $(OBJDIR
)/sord.c.
%32.o
: sord.c
117 @echo
"Compiling $< (32bit)"
118 $(SILENT
)$(CC
) $< $(BUILD_C_FLAGS
) -Isord-
$(SORD_VERSION
) -Isord-
$(SORD_VERSION
)/src
-fno-strict-aliasing
$(32BIT_FLAGS
) -c
-o
$@
120 $(OBJDIR
)/sord.c.
%64.o
: sord.c
122 @echo
"Compiling $< (64bit)"
123 $(SILENT
)$(CC
) $< $(BUILD_C_FLAGS
) -Isord-
$(SORD_VERSION
) -Isord-
$(SORD_VERSION
)/src
-fno-strict-aliasing
$(64BIT_FLAGS
) -c
-o
$@
125 $(OBJDIR
)/sord.c.arm32.o
: sord.c
127 @echo
"Compiling $< (ARM32)"
128 $(SILENT
)$(CC
) $< $(BUILD_C_FLAGS
) -Isord-
$(SORD_VERSION
) -Isord-
$(SORD_VERSION
)/src
-fno-strict-aliasing
$(ARM32_FLAGS
) -c
-o
$@
130 # ---------------------------------------------------------------------------------------------------------------------
132 $(OBJDIR
)/sratom.c.o
: sratom.c
135 $(SILENT
)$(CC
) $< $(BUILD_C_FLAGS
) -Isratom-
$(SRATOM_VERSION
) -c
-o
$@
137 $(OBJDIR
)/sratom.c.
%32.o
: sratom.c
139 @echo
"Compiling $< (32bit)"
140 $(SILENT
)$(CC
) $< $(BUILD_C_FLAGS
) -Isratom-
$(SRATOM_VERSION
) $(32BIT_FLAGS
) -c
-o
$@
142 $(OBJDIR
)/sratom.c.
%64.o
: sratom.c
144 @echo
"Compiling $< (64bit)"
145 $(SILENT
)$(CC
) $< $(BUILD_C_FLAGS
) -Isratom-
$(SRATOM_VERSION
) $(64BIT_FLAGS
) -c
-o
$@
147 $(OBJDIR
)/sratom.c.arm32.o
: sratom.c
149 @echo
"Compiling $< (ARM32)"
150 $(SILENT
)$(CC
) $< $(BUILD_C_FLAGS
) -Isratom-
$(SRATOM_VERSION
) $(ARM32_FLAGS
) -c
-o
$@
152 # ---------------------------------------------------------------------------------------------------------------------
154 $(OBJDIR
)/lilv.c.o
: lilv.c
157 $(SILENT
)$(CC
) $< $(BUILD_C_FLAGS
) -Ililv-
$(LILV_VERSION
) -Ililv-
$(LILV_VERSION
)/src
-c
-o
$@
159 $(OBJDIR
)/lilv.c.
%32.o
: lilv.c
161 @echo
"Compiling $< (32bit)"
162 $(SILENT
)$(CC
) $< $(BUILD_C_FLAGS
) -Ililv-
$(LILV_VERSION
) -Ililv-
$(LILV_VERSION
)/src
$(32BIT_FLAGS
) -c
-o
$@
164 $(OBJDIR
)/lilv.c.
%64.o
: lilv.c
166 @echo
"Compiling $< (64bit)"
167 $(SILENT
)$(CC
) $< $(BUILD_C_FLAGS
) -Ililv-
$(LILV_VERSION
) -Ililv-
$(LILV_VERSION
)/src
$(64BIT_FLAGS
) -c
-o
$@
169 $(OBJDIR
)/lilv.c.arm32.o
: lilv.c
171 @echo
"Compiling $< (ARM32)"
172 $(SILENT
)$(CC
) $< $(BUILD_C_FLAGS
) -Ililv-
$(LILV_VERSION
) -Ililv-
$(LILV_VERSION
)/src
$(ARM32_FLAGS
) -c
-o
$@
174 # ---------------------------------------------------------------------------------------------------------------------
176 -include $(OBJS
:%.o
=%.d
)
177 -include $(OBJS_arm32
:%.o
=%.d
)
178 -include $(OBJS_posix32
:%.o
=%.d
)
179 -include $(OBJS_posix64
:%.o
=%.d
)
180 -include $(OBJS_win32
:%.o
=%.d
)
181 -include $(OBJS_win64
:%.o
=%.d
)
183 # ---------------------------------------------------------------------------------------------------------------------