mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
52 lines
1.3 KiB
Makefile
52 lines
1.3 KiB
Makefile
#
|
|
# $Id: libprofile.gmk,v 1.1 2006-09-17 17:37:27 obarthel Exp $
|
|
#
|
|
# vim:ts=8 ft=make:
|
|
#
|
|
# -*- mode: makefile; -*-
|
|
|
|
##############################################################################
|
|
|
|
include libprofile.obj.gmk
|
|
|
|
##############################################################################
|
|
|
|
define libprofile_rule
|
|
|
|
LIBS += lib/$(1).a lib.threadsafe/$(1).a
|
|
|
|
# Dependencies to rebuild if the library version changes
|
|
obj/$(1)/profile.lib_rev.o : profile.lib_rev.c profile.lib_rev.h
|
|
obj.threadsafe/$(1)/profile.lib_rev.o : profile.lib_rev.c profile.lib_rev.h
|
|
|
|
obj/$(1)/%.o : CFLAGS += $(2)
|
|
obj/$(1)/%.o : %.c
|
|
@$$(COMPILE)
|
|
|
|
obj/$(1)/%.o : AFLAGS += $(2)
|
|
obj/$(1)/%.o : %.S
|
|
@$$(ASSEMBLE)
|
|
|
|
obj.threadsafe/$(1)/%.o : CFLAGS += $(THREADSAFE) $(2)
|
|
obj.threadsafe/$(1)/%.o : %.c
|
|
@$$(COMPILE)
|
|
|
|
obj.threadsafe/$(1)/%.o : AFLAGS += $(2)
|
|
obj.threadsafe/$(1)/%.o : %.S
|
|
@$$(ASSEMBLE)
|
|
|
|
lib/$(1).a : $$(addprefix obj/$(1)/,$$(PROFILE_LIB))
|
|
@$$(MAKELIB)
|
|
|
|
lib.threadsafe/$(1).a : $$(addprefix obj.threadsafe/$(1)/,$$(PROFILE_LIB))
|
|
@$$(MAKELIB)
|
|
|
|
endef
|
|
|
|
##############################################################################
|
|
|
|
$(eval $(call libprofile_rule,libprofile,$(LARGEDATA)))
|
|
$(eval $(call libprofile_rule,soft-float/libprofile,$(SOFTFLOAT)))
|
|
$(eval $(call libprofile_rule,small-data/libprofile,$(SMALLDATA)))
|
|
$(eval $(call libprofile_rule,baserel/libprofile,$(BASEREL)))
|