CC=gcc
LD=ld
LD=/export/build/linux/binutils-debug/build-ia64-linux/ld/ld-new

PROGS=kernel normal

all: $(PROGS)

normal: normal.o
	$(LD) -o $@ -Tt.lds $^

kernel: kernel.o
	$(LD) -o $@ -Tt.lds $^
	readelf -u kernel | fgrep '<'; \

normal.o: t.S
	$(CC) -c -o $@ $<

kernel.o: t.S
	$(CC) -mconstant-gp -c -o $@ $<

tar:
	tar cfz bug.tar.gz t.* Makefile

clean:
	rm -f $(PROGS) *.o
