-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
98 lines (77 loc) · 1.84 KB
/
Makefile
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
#
# Created by makemake (Sparc Jul 27 2005) on Thu May 5 11:14:33 2011
#
#
# Definitions
#
.SUFFIXES:
.SUFFIXES: .a .o .c .C .cpp
.c.o:
$(COMPILE.c) $<
.C.o:
$(COMPILE.cc) $<
.cpp.o:
$(COMPILE.cc) $<
.c.a:
$(COMPILE.c) -o $% $<
$(AR) $(ARFLAGS) $@ $%
$(RM) $%
.C.a:
$(COMPILE.cc) -o $% $<
$(AR) $(ARFLAGS) $@ $%
$(RM) $%
.cpp.a:
$(COMPILE.cc) -o $% $<
$(AR) $(ARFLAGS) $@ $%
$(RM) $%
CC = cc
CXX = CC
RM = rm -f
AR = ar
LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
LINK.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS)
COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c
COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c
########## Flags from header.mak
BASE = /home/course/vcsg720
ARCHVER = arch2-5a
CXX = /opt/SUNWspro/bin/CC
CCFLAGS = +w -g -xsb -I$(BASE)/include/$(ARCHVER)
CXXFLAGS = $(CCFLAGS)
LIBFLAGS = -g -L$(BASE)/lib/solaris_SPARC -l$(ARCHVER)
CCLIBFLAGS = $(LIBFLAGS)
########## End of flags from header.mak
CPP_FILES = CPU.C MicroInst.C globals.C
C_FILES =
H_FILES = MicroInst.h globals.h includes.h
SOURCEFILES = $(H_FILES) $(CPP_FILES) $(C_FILES)
.PRECIOUS: $(SOURCEFILES)
OBJFILES = MicroInst.o globals.o
#
# Main targets
#
all: CPU Memory.obj.o mMemory.obj.o
Memory.obj.o: Memory.obj
cpp -P Memory.obj > Memory.obj.o
mMemory.obj.o: mMemory.obj
cpp -P mMemory.obj > mMemory.obj.o
CPU: CPU.o $(OBJFILES)
$(CXX) $(CXXFLAGS) -o CPU CPU.o $(OBJFILES) $(CCLIBFLAGS)
#
# Dependencies
#
CPU.o: MicroInst.h globals.h includes.h
MicroInst.o: MicroInst.h globals.h includes.h
globals.o: MicroInst.h globals.h includes.h
#
# Housekeeping
#
Archive: archive.tgz
archive.tgz: $(SOURCEFILES) Makefile
tar cf - $(SOURCEFILES) Makefile | gzip > archive.tgz
clean:
-/bin/rm -r $(OBJFILES) CPU.o ptrepository SunWS_cache .sb ii_files core 2> /dev/null
rm *~
rm mMemory.obj.o Memory.obj.o
realclean: clean
/bin/rm -rf CPU