summaryrefslogtreecommitdiffstats
path: root/c/src/optman/Makefile.am
blob: ee2872875b40b7fd948080328d1f6e033b28cd2e (plain) (blame)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
##
## $Id$
##

ACLOCAL_AMFLAGS = -I ../../../aclocal

include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
include $(top_srcdir)/../../../automake/compile.am
include $(top_srcdir)/../../../automake/lib.am

C_FILES = sapi/no-ext.c sapi/no-io.c
C_O_FILES = $(C_FILES:sapi/%.c=$(ARCH)/%.$(OBJEXT))

C_FILES += rtems/no-dpmem.c rtems/no-event.c rtems/no-msg.c rtems/no-mp.c \
    rtems/no-part.c rtems/no-region.c \
    rtems/no-rtmon.c rtems/no-sem.c rtems/no-signal.c rtems/no-timer.c
C_O_FILES += $(C_FILES:rtems/%.c=${ARCH}/%.$(OBJEXT))

PGMS = $(C_FILES:rtems/%.c=$(ARCH)/%$(LIB_VARIANT).rel)
PGMS += $(C_FILES:sapi/%.c=$(ARCH)/%$(LIB_VARIANT).rel)

${ARCH}/%.o: sapi/%.c
	test -d $(ARCH) || mkdir $(ARCH)
	${COMPILE} -o $@ -c $<

${ARCH}/%.o: rtems/%.c
	test -d $(ARCH) || mkdir $(ARCH)
	${COMPILE} -o $@ -c $<

# Make foo.rel from foo.o
${ARCH}/%$(LIB_VARIANT).rel: ${ARCH}/%.o
	test -d $(ARCH) || mkdir $(ARCH)
	${make-rel}

bsplib_DATA = $(PGMS)

TMPINSTALL_FILES += \
    $(PGMS:${ARCH}/%$(LIB_VARIANT).rel=$(PROJECT_RELEASE)/lib/%$(LIB_VARIANT).rel)

$(PROJECT_RELEASE)/lib/%$(LIB_VARIANT).rel: $(ARCH)/%$(LIB_VARIANT).rel
	$(INSTALL_DATA) $< $@

all-local: ${ARCH} $(PGMS) $(TMPINSTALL_FILES)

.PRECIOUS: $(PGMS) $(C_O_FILES)

EXTRA_DIST = $(C_FILES)

include $(top_srcdir)/../../../automake/local.am