blob: eb380e2303e0b44459f40a8ca25369083b3419bb (
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
|
# test/Programs/SingleSource/Makefile
#
# This makefile builds all of the C programs in this directory in three
# different configurations:
# 1. By the native GCC compiler
# 2. To LLVM bytecode
# 3. To Sparc machine code, from bytecode, using LLC
#
# After building all of these different forms, the programs are run and the
# output is diff'd
#
# FIXME: There should be a way to specify libraries to link programs against
# FIXME: There should be a way to specify the command line for a program
#
# IDEA: This could be specified in the start of the .c file, in a comment block
#
PROGRAMS_TO_TEST = $(Source:.c=)
include $(LEVEL)/test/Programs/Makefile.programs
# FIXME: LIBS should be specified, not hardcoded to -lm
Output/%.native: %.c Output/.dir
$(NATGCC) $< -lm -o $@
# Since this is just a single source program, the linked version of the program
# is the same as the unlinked version...
#
# FIXME: LIBS should be specified, not hardcoded to -lc -lm
Output/%.llvm: Output/%.bc
$(LGCCLD) $< -lc -lm -o $@
|