# 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) $< -lgcc -lc -lm -o $@