summaryrefslogtreecommitdiffstats
path: root/src/util/profile/Makefile.in
blob: 80735e766399c8e59793d8e0577dea9f293dc660 (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
thisconfigdir=./
BUILDTOP=$(U)$(U)
##DOS##BUILDTOP = ..\..
##DOS##OBJFILE=profile.lst
##DOS##LIBNAME=profile.lib
##DOS##DOSDEFS=-DHAVE_STDLIB_H

CFLAGS = $(CCOPTS) $(DEFS) $(LOCALINCLUDE) $(DOSDEFS)

LOCALINCLUDE=-I. -I$(srcdir)/../et

STLIBOBJS = \
	prof_tree.o \
	prof_file.o \
	prof_parse.o \
	prof_err.o \
	prof_init.o

OBJS = prof_tree.$(OBJEXT) \
	prof_file.$(OBJEXT) \
	prof_parse.$(OBJEXT) \
	prof_err.$(OBJEXT) \
	prof_init.$(OBJEXT)

SRCS = $(srcdir)/prof_tree.c \
	$(srcdir)/prof_file.c \
	$(srcdir)/prof_parse.c \
	prof_err.c \
	$(srcdir)/prof_init.c

LIBS = ../et/libcom_err.$(LIBEXT)

LIB=profile
LIBMAJOR=1
LIBMINOR=0
STOBJLISTS=OBJS.ST

all-unix:: includes test_parse test_profile
all-unix:: all-libs
all-windows::

includes:: profile.h
	if cmp profile.h \
	$(BUILDTOP)/include/profile.h >/dev/null 2>&1; then :; \
	else \
		(set -x; $(RM) $(BUILDTOP)/include/profile.h; \
		 $(CP) profile.h $(BUILDTOP)/include/profile.h) ; \
	fi

clean-unix::
	$(RM) $(BUILDTOP)/include/profile.h

##DOS##LIBOBJS = $(OBJS)


awk-windows:
	$(AWK) -f $(BUILDTOP)/util/et/et_h.awk outfile=prof_err.h prof_err.et
	$(AWK) -f $(BUILDTOP)/util/et/et_c.awk outfile=prof_err.c prof_err.et
	if exist prof_err.h copy profile.hin+prof_err.h profile.h
	if exist profile.h copy profile.h $(BUILDTOP)\include\profile.h

test_parse: test_parse.$(OBJEXT) $(OBJS) $(LIBS)
	$(CC) -o test_parse test_parse.$(OBJEXT) $(OBJS) $(LIBS)

test_profile: test_profile.$(OBJEXT) $(OBJS) $(LIBS)
	$(CC) -o test_profile test_profile.$(OBJEXT) $(OBJS) $(LIBS)

test_parse.exe: 
	$(CC) $(CFLAGS2) -o test_parse.exe test_parse.c \
		prof_parse.c prof_tree.c /link /stack:16384

test_profile.exe: 
	$(CC) $(CFLAGS2) -o test_profile.exe test_profile.c prof_init.c \
		prof_file.c prof_parse.c prof_tree.c /link /stack:16384

profile.h: prof_err.h profile.hin
	cat $(srcdir)/profile.hin prof_err.h > $@

prof_err.h: $(srcdir)/prof_err.et

prof_err.c: $(srcdir)/prof_err.et

prof_err.o: prof_err.c

clean-unix:: clean-libs clean-libobjs
	$(RM) $(PROGS) *.o *~ test_parse core prof_err.h \
		prof_err.c test_profile profile.h

clean-windows::
	$(RM) profile.lib profile.bak test_parse.exe test_profile.exe

check-windows:: test_profile.exe test_parse.exe
	$(RM) *.obj
	test_parse test.ini

# +++ Dependency line eater +++
# 
# Makefile dependencies follow.  This must be the last section in
# the Makefile.in file
#
prof_tree.o: $(srcdir)/prof_tree.c $(srcdir)/prof_int.h prof_err.h
prof_file.o: $(srcdir)/prof_file.c $(srcdir)/prof_int.h prof_err.h
prof_parse.o: $(srcdir)/prof_parse.c $(srcdir)/prof_int.h prof_err.h
prof_err.o: prof_err.c
prof_init.o: $(srcdir)/prof_init.c $(srcdir)/prof_int.h prof_err.h