summaryrefslogtreecommitdiff
path: root/lib/Makefile.profile
blob: ad0f1df004de2767e7feca6bc2102af445595601 (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
all:: profiled $(LIBRARY)_p.a

subdirs:: Makefile
	@echo "	MKDIR $@"
	@mkdir -p profiled

clean::
	$(RM) -rf profiled
	$(RM) -f $(LIBRARY)_p.a ../$(LIBRARY)_p.a

$(LIBRARY)_p.a: $(OBJS)
	@echo "	GEN_PROFILED_LIB $(ELF_LIB)"
	@(if test -r $@; then $(RM) -f $@.bak && $(MV) $@ $@.bak; fi)
	@(cd profiled; $(ARUPD) ../$@ $(OBJS))
	-@$(RANLIB) $@
	@$(RM) -f ../$@
	@$(LN) $@ ../$@

install:: $(LIBRARY)_p.a installdirs
	@echo "	INSTALL_DATA $(libdir)/$(LIBRARY)_p.a"
	@$(INSTALL_DATA) $(LIBRARY)_p.a $(DESTDIR)$(libdir)/$(LIBRARY)_p.a
	@-$(RANLIB) $(DESTDIR)$(libdir)/$(LIBRARY)_p.a
	@$(CHMOD) $(LIBMODE) $(DESTDIR)$(libdir)/$(LIBRARY)_p.a

uninstall::
	$(RM) -f $(DESTDIR)$(libdir)/$(LIBRARY)_p.a