CC = gcc -B. -B/dev/env/DJDIR/elf -O2 -nodefaultlibs

all:
	$(CC) -o easy.o -c easy.c
	$(CC) -o easy.S -S easy.c
	$(CC) -o libez.so -shared -fPIC -DPIC easy.o

	$(CC) -o easyp.o -fPIC -DPIC -c easy.c
	$(CC) -o easyp.S -fPIC -DPIC -S easy.c
	$(CC) -o libezp.so -shared easyp.o

	$(CC) -o test.o -c test.c
	$(CC) -o testp.o -fPIC -DPIC -c test.c

	$(CC) -o test.S -S test.c
	$(CC) -o testp.S -fPIC -DPIC -S test.c

	$(CC) -o tst.out -L. test.o -lez
	$(CC) -o tstp.out -fPIC -DPIC -L. testp.o -lezp

clean:
	del easy.o
	del easyp.o
	del easy.S
	del easyp.S
	del libez.so
	del libezp.so
	del test.o
	del testp.o
	del test.S
	del testp.S
	del tst.out
	del tstp.out
	del tst.exe
	del tstp.exe
