Makefile
1003 Bytes
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
#!smake -k
#
# Makefile for logtest application
PRDEPTH = ../..
include $(PRDEPTH)/PRdefs
APP = logtest
OPTIMIZER = -g
TARGETS = rom
TEXHFILES =
HFILES = $(TEXHFILES) logtest.h
CODEFILES = logtest.c
CODEOBJECTS = $(CODEFILES:.c=.o)
CODESEGMENT = codesegment.o
OBJECTS = $(CODESEGMENT)
LCINCS = -I. -I$(ROOT)/usr/include/PR -I $(ROOT)/usr/include
LCOPTS = -fullwarn -non_shared -G 0
LDIRT = $(APP) logtest $(TEXHFILES) *.so
LDFLAGS = $(MKDEPOPT) -nostdlib -L$(ROOT)/usr/lib -L$(ROOT)/usr/lib/PR -lultra_d
default: $(TARGETS)
include $(COMMONRULES)
#
# what does it mean to 'install' this thing?
#
install: default
$(CODESEGMENT): logtest.o
$(LD) -o $(CODESEGMENT) -r logtest.o $(LDFLAGS)
#
# This must depend on the generated h-files.
# If we don't do this, smake fails.
#
logtest.o: $(TEXHFILES)
$(OBJECTS): $(HFILES)
rom $(APP): spec $(OBJECTS) $(MAKEROM)
$(MAKEROM) -r rom spec
#
# Files specific to Hardware/Emulator
#
logtest.o: logtest.c
$(CC) $(CFLAGS) -c $<