summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/powerpc/shared/Makefile.am
blob: d78721128201ec29f54b97bb7911e17d87aaf03f (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
##
## $Id$
##

include $(top_srcdir)/../../../automake/compile.am
include $(top_srcdir)/../../../automake/lib.am

# include

libcpuspec_C_FILES = include/cpuIdent.c
libcpuspec_OBJS = \
    $(libcpuspec_C_FILES:include/%.c=include/$(ARCH)/%.$(OBJEXT))

include_libcpudir = $(includedir)/libcpu

include_libcpu_HEADERS = include/spr.h include/io.h include/mmu.h \
    include/page.h include/byteorder.h include/pgtable.h include/cpuIdent.h

include/$(ARCH)/$(dirstamp):
	@$(mkdir_p) include/$(ARCH)
	@: > include/$(ARCH)/$(dirstamp)
include/$(ARCH)/%.$(OBJEXT): include/%.c include/$(ARCH)/$(dirstamp)
	${COMPILE} -o $@ -c $<
include/$(ARCH)/libcpuspec.a: $(libcpuspec_OBJS)
	$(make-library)
CLEANDIRS = include/o-optimize include/o-debug

EXTRA_DIST = libcpuspec_C_FILES

# src

src_C_FILES = src/cache.c src/stack.c

common_C_FILES = ../../shared/src/cache_aligned_malloc.c
common_C_FILES += ../../shared/src/cache_manager.c

src_O_FILES = $(src_C_FILES:src/%.c=src/$(ARCH)/%.$(OBJEXT))
common_O_FILES = \
    $(common_C_FILES:../../shared/src/%.c=src/$(ARCH)/%.$(OBJEXT))

src/$(ARCH)/$(dirstamp):
	@$(mkdir_p) src/$(ARCH)
	@: > src/$(ARCH)/$(dirstamp)
src/$(ARCH)/%.$(OBJEXT): ../../shared/src/%.c src/$(ARCH)/$(dirstamp)
	${COMPILE} -I$(srcdir)/src -o $@ -c $<
src/$(ARCH)/%.$(OBJEXT): src/%.c src/$(ARCH)/$(dirstamp)
	${COMPILE} -I$(srcdir)/src -o $@ -c $<
CLEANDIRS += src/o-optimize src/o-debug

noinst_HEADERS = src/cache_.h
include_libcpu_HEADERS += src/stackTrace.h
include_libcpu_HEADERS += ../../shared/include/cache.h

all-local: $(PREINSTALL_FILES) include/$(ARCH)/libcpuspec.a $(src_O_FILES) $(common_O_FILES)

PREINSTALL_FILES =

$(PROJECT_INCLUDE)/libcpu/$(dirstamp):
	@$(mkdir_p) $(PROJECT_INCLUDE)/libcpu
	@: > $(PROJECT_INCLUDE)/libcpu/$(dirstamp)

$(PROJECT_INCLUDE)/libcpu/spr.h: include/spr.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/spr.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/spr.h

$(PROJECT_INCLUDE)/libcpu/io.h: include/io.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/io.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/io.h

$(PROJECT_INCLUDE)/libcpu/mmu.h: include/mmu.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/mmu.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/mmu.h

$(PROJECT_INCLUDE)/libcpu/page.h: include/page.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/page.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/page.h

$(PROJECT_INCLUDE)/libcpu/byteorder.h: include/byteorder.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/byteorder.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/byteorder.h

$(PROJECT_INCLUDE)/libcpu/pgtable.h: include/pgtable.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/pgtable.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/pgtable.h

$(PROJECT_INCLUDE)/libcpu/cpuIdent.h: include/cpuIdent.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/cpuIdent.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/cpuIdent.h

$(PROJECT_INCLUDE)/libcpu/stackTrace.h: src/stackTrace.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/stackTrace.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/stackTrace.h

$(PROJECT_INCLUDE)/libcpu/cache.h: ../../shared/include/cache.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/cache.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/cache.h

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