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
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; \
42 -rm -f
$(all_LIBS
) $(liberuntime_a_OBJECTS
) $(liberuntime_so_OBJECTS
)
44 -include Makefile.deps
46 # vim: ts=8 sw=8 noet fdm=marker tw=80