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