aboutsummaryrefslogtreecommitdiffstats
path: root/testfloat/SPARC-Solaris-gcc/Makefile
blob: ee53aa19d334c8e5b99167152ad947ebfdd15ec1 (plain) (blame)
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

PROCESSOR_H = ../../processors/SPARC-gcc.h
SOFTFLOAT_VERSION = bits64
TARGET = SPARC-Solaris-gcc
SOFTFLOAT_DIR = ../../softfloat/$(SOFTFLOAT_VERSION)/$(TARGET)

OBJ = .o
EXE =
INCLUDES = -I. -I.. -I$(SOFTFLOAT_DIR)
COMPILE_ASM = gcc -c -o $@
COMPILE_C = gcc -c -o $@ $(INCLUDES) -I- -O2
COMPILE_SLOWFLOAT_C = gcc -c -o $@ $(INCLUDES) -I- -O3
LINK = gcc -o $@

SOFTFLOAT_H = $(SOFTFLOAT_DIR)/softfloat.h
SOFTFLOAT_OBJ = $(SOFTFLOAT_DIR)/softfloat$(OBJ)

ALL: testsoftfloat$(EXE) testfloat$(EXE)

milieu.h: $(PROCESSOR_H)
	touch milieu.h

fail$(OBJ): milieu.h ../fail.h
	$(COMPILE_C) ../fail.c

random$(OBJ): milieu.h ../random.h
	$(COMPILE_C) ../random.c

testCases$(OBJ): milieu.h ../fail.h ../random.h $(SOFTFLOAT_H) ../testCases.h ../testCases.c
	$(COMPILE_C) ../testCases.c

writeHex$(OBJ): milieu.h $(SOFTFLOAT_H) ../writeHex.h ../writeHex.c
	$(COMPILE_C) ../writeHex.c

testLoops$(OBJ): milieu.h $(SOFTFLOAT_H) ../testCases.h ../writeHex.h ../testLoops.h ../testLoops.c
	$(COMPILE_C) ../testLoops.c

slowfloat$(OBJ): milieu.h $(SOFTFLOAT_H) ../slowfloat.h ../slowfloat-32.c ../slowfloat-64.c ../slowfloat.c
	$(COMPILE_SLOWFLOAT_C) ../slowfloat.c

testsoftfloat$(OBJ): milieu.h ../fail.h $(SOFTFLOAT_H) ../testCases.h ../testLoops.h ../slowfloat.h ../testsoftfloat.c
	$(COMPILE_C) ../testsoftfloat.c

testsoftfloat$(EXE): fail$(OBJ) random$(OBJ) $(SOFTFLOAT_OBJ) testCases$(OBJ) writeHex$(OBJ) testLoops$(OBJ) slowfloat$(OBJ) testsoftfloat$(OBJ)
	$(LINK) fail$(OBJ) random$(OBJ) $(SOFTFLOAT_OBJ) testCases$(OBJ) writeHex$(OBJ) testLoops$(OBJ) slowfloat$(OBJ) testsoftfloat$(OBJ)

systmodes$(OBJ): milieu.h ../systmodes.h systmodes.c
	$(COMPILE_C) systmodes.c

systflags$(OBJ): milieu.h ../systflags.h systflags.c
	$(COMPILE_C) systflags.c

systfloat$(OBJ): systfloat.S
	$(COMPILE_ASM) systfloat.S

testFunction$(OBJ): milieu.h $(SOFTFLOAT_H) ../testCases.h ../testLoops.h ../systmodes.h ../systflags.h systfloat.h ../testFunction.h ../testFunction.c
	$(COMPILE_C) ../testFunction.c

testfloat$(OBJ): milieu.h ../fail.h $(SOFTFLOAT_H) ../testCases.h ../testLoops.h ../systflags.h ../testFunction.h ../testfloat.c
	$(COMPILE_C) ../testfloat.c

testfloat$(EXE): fail$(OBJ) random$(OBJ) $(SOFTFLOAT_OBJ) testCases$(OBJ) writeHex$(OBJ) testLoops$(OBJ) systmodes$(OBJ) systflags$(OBJ) systfloat$(OBJ) testFunction$(OBJ) testfloat$(OBJ)
	$(LINK) fail$(OBJ) random$(OBJ) $(SOFTFLOAT_OBJ) testCases$(OBJ) writeHex$(OBJ) testLoops$(OBJ) systmodes$(OBJ) systflags$(OBJ) systfloat$(OBJ) testFunction$(OBJ) testfloat$(OBJ)