summaryrefslogtreecommitdiffstats
path: root/c/src/librdbg/src/i386/any/Makefile.in
blob: 84e1ed7c3768dacca482c407b6c927438285f3bc (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
99
100
101
102
103
104
105
106
107
108
109
#
#  $Id$
#

@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = ../../..
subdir = src/i386/pc386

RTEMS_ROOT = @RTEMS_ROOT@
PROJECT_ROOT = @PROJECT_ROOT@

VPATH = @srcdir@:@srcdir@/..:@srcdir@/../..

LIBNAME = librdbg.a
LIB = ${ARCH}/${LIBNAME}

# C and C++ source names, if any, go here -- minus the .c or .cc
C_PIECES = rdbg servcon servbkpt servrpc excep_f servtgt servtsp \
    servutil _servtgt rdbg_f ptrace

C_FILES = $(C_PIECES:%=%.c)
C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)

# Asm source names, if any, go here -- minus the .s 
S_PIECES = rdbg_cpu_asm
S_FILES = $(S_PIECES:%=%.S)
S_O_FILES = $(S_PIECES:%=${ARCH}/%.o)

# Generated C source names, if any, go here -- minus the .c
GEN_C_PIECES = remdeb_xdr remdeb_svc
GEN_C_FILES = $(GEN_C_PIECES:%=%.c)
GEN_C_O_FILES = $(GEN_C_PIECES:%=${ARCH}/%.o)

# H source names, if any, go here -- minus the .h
H_PIECES = remdeb
H_FILES = $(H_PIECES:%=%.h)

# X source names
X_FILES = remdeb.x remdeb_f.x

SRCS = $(C_FILES) $(S_FILES) $(GEN_C_FILES) $(H_FILES)
OBJS = $(GEN_C_O_FILES) $(C_O_FILES) $(S_O_FILES)

RPCGEN = @RPCGEN@
AWK = @AWK@

include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
include $(RTEMS_ROOT)/make/lib.cfg

INSTALL_CHANGE = @INSTALL_CHANGE@
mkinstalldirs = $(SHELL) $(top_srcdir)/@RTEMS_TOPdir@/mkinstalldirs

INSTALLDIRS = $(PROJECT_INCLUDE)/rdbg

$(INSTALLDIRS):
	@$(mkinstalldirs) $(INSTALLDIRS)

#
# Add local stuff here using +=
#

DEFINES +=
CPPFLAGS +=
CFLAGS +=

#
# Add your list of files to delete here.  The config files
#  already know how to delete some stuff, so you may want
#  to just run 'make clean' first to see what gets missed.
#  'make clobber' already includes 'make clean'
#

CLEAN_ADDITIONS += $(LIB) $(H_FILES) $(GEN_C_FILES)
CLOBBER_ADDITIONS +=

FRONTEND = \"$(RTEMS_CPU)/@RTEMS_BSP@/remdeb_f.x\"

all: ${ARCH} $(LIB)
	@$(INSTALL_VARIANT) -m 644 $(LIB) $(PROJECT_RELEASE)/lib

$(LIB): $(SRCS) ${OBJS}
	$(make-library)

remdeb.h: $(X_FILES)
	@rm -f $@
	( pwd=`pwd`; cd $(srcdir)/../..; \
	$(RPCGEN) -h -DFRONTEND=$(FRONTEND) \
	  -o $$pwd/$@ remdeb.x )
	@$(INSTALL_CHANGE) -m 755 $@ $(PROJECT_INCLUDE)/rdbg

remdeb_xdr.c: $(X_FILES)
	@rm -f $@
	( pwd=`pwd`; cd $(srcdir)/../..; \
	$(RPCGEN) -c -DFRONTEND=$(FRONTEND) \
	  -o $$pwd/$@ remdeb.x )

remdeb_svc.c: $(X_FILES)
	@rm -f $@ tmpSvc.c
	( pwd=`pwd`; cd $(srcdir)/../..; \
	$(RPCGEN) -s udp -DFRONTEND=$(FRONTEND) \
	  -o $$pwd/tmpSvc.c remdeb.x )
	$(AWK) -f $(srcdir)/../../awk.svc THEPROG="remdeb.h" tmpSvc.c >$@
	@rm -f tmpSvc.c

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	cd $(top_builddir) \
	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status