Add/update tests.
[eruntime.git] / src / Makefile
blob3b900585761e828b4d6ebc711f5d170aa26da33f
1 topdir = ..
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))
11 .PHONY: all
12 all: $(all_LIBS)
14 .PHONY: deps
15 deps:
16 $(MKDEPS) $(CC) '$(CFLAGS)' '$(common_SOURCES)'
18 %.static.o: %.c
19 $(call wrap_CC,,$<,$@)
20 %.shared.o: %.c
21 $(call wrap_CC,-fpic -fPIC,$<,$@)
23 liberuntime.a: $(liberuntime_a_OBJECTS)
24 $(call wrap_AR,$@,$^)
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
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; \
38 done
40 .PHONY: clean
41 clean:
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