2 include $(topdir
)/Makefile.top
4 all_LIBS
= liberuntime.a liberuntime.so
6 common_SOURCES
= list.c smalloc.c version.c
8 liberuntime_a_OBJECTS
= $(patsubst %.c
,%.static.o
,$(common_SOURCES
))
9 liberuntime_so_OBJECTS
= $(patsubst %.c
,%.shared.o
,$(common_SOURCES
))
16 $(MKDEPS
) $(CC
) '$(CFLAGS)' '$(common_SOURCES)'
19 $(call wrap_CC
,,$<,$@
)
21 $(call wrap_CC
,-fpic
-fPIC
,$<,$@
)
23 liberuntime.a
: $(liberuntime_a_OBJECTS
)
25 $(call wrap_RANLIB
,$@
)
27 liberuntime.so
: $(liberuntime_so_OBJECTS
)
28 $(call wrap_LD
,$@
,$^
,-shared
)
30 .PHONY
: install install-libs install-headers
31 install: install-libs install-headers
33 install-libs
: $(all_LIBS
)
34 @
$(INSTALL_DIR
) $(DESTDIR
)$(libdir) || exit
1; \
35 list
='$(all_LIBS)'; for lib in
$$list; do \
36 echo
"Installing $(DESTDIR)$(libdir)/$$lib..."; \
37 $(INSTALL_BIN
) $$lib $(DESTDIR
)$(libdir) || exit
1; \
40 install-headers
: install-libs
41 @
$(INSTALL_DIR
) $(DESTDIR
)$(includedir) || exit
1; \
42 list
="$$(echo *.h)"; [ "$$list" != '*.h' ] && { \
43 for hdr in
$$list; do \
44 echo
"Installing $(DESTDIR)$(includedir)/$$lib..."; \
45 $(INSTALL_DATA
) $$hdr $(DESTDIR
)$(includedir) || exit
1; \
51 -rm -f
$(all_LIBS
) $(liberuntime_a_OBJECTS
) $(liberuntime_so_OBJECTS
)
53 -include Makefile.deps
55 # vim: ts=8 sw=8 noet fdm=marker tw=80