Makefile revision 7998:916491cca643
112608Sjason@lowepower.com#Makefile for palcode
212608Sjason@lowepower.com#Works on alpha-linux and builds elf executable
314184Sgabeblack@google.com
412608Sjason@lowepower.com#19 December 2003 - Ali Saidi
512608Sjason@lowepower.com
612608Sjason@lowepower.comGAS = alpha-elf-as
712608Sjason@lowepower.comCC = alpha-elf-g++
812608Sjason@lowepower.comLD = alpha-elf-ld
912608Sjason@lowepower.com#CFLAGS=-I ../h -E -P -D SIMOS -nostdinc -nostdinc++ -x c++
1012608Sjason@lowepower.comCFLAGS=-I . -I ../h -E -P -D SIMOS -D BUILD_PALCODE -nostdinc -nostdinc++ -x c++
1112608Sjason@lowepower.comGASFLAGS=-m21164
12LDFLAGS=-Ttext 0x4000
13
14SOURCES=osfpal.s osfpal_cache_copy.s osfpal_cache_copy_unaligned.s platform_tlaser.s \
15	 platform_m5.s
16PREPROC := $(SOURCES:.s=.i)
17TLOBJS = osfpal.o osfpal_cache_copy.o osfpal_cache_copy_unaligned.o platform_tlaser.o
18TSOBJS = osfpal.o osfpal_cache_copy.o osfpal_cache_copy_unaligned.o platform_m5.o
19
20%.i: %.s
21	$(CC) $(CFLAGS) $< > $@
22
23%.o: %.i
24	$(GAS) $(GASFLAGS) -o $@ $< 
25
26all: tlaser tsunami
27
28tlaser: $(PREPROC) $(TLOBJS)
29	$(LD) $(LDFLAGS) -o tl_osfpal osfpal.o platform_tlaser.o
30	$(LD) $(LDFLAGS) -o tl_osfpal_cache osfpal_cache_copy.o platform_tlaser.o
31	$(LD) $(LDFLAGS) -o tl_osfpal_unalign osfpal_cache_copy_unaligned.o platform_tlaser.o
32
33tsunami: $(PREPROC) $(TSOBJS)
34	$(LD) $(LDFLAGS) -o ts_osfpal osfpal.o platform_m5.o
35	$(LD) $(LDFLAGS) -o ts_osfpal_cache  osfpal_cache_copy.o platform_m5.o
36	$(LD) $(LDFLAGS) -o ts_osfpal_unalign osfpal_cache_copy_unaligned.o platform_m5.o
37
38clean:
39	rm -f *.o *.i tl_osfpal tl_osfpal_cache tl_osfpal_unalign ts_osfpal \
40	ts_osfpal_cache ts_osfpal_unalign
41