CC = gcc -B/dev/env/DJDIR/elf
CXX = gxx -B/dev/env/DJDIR/elf

all:
	$(CC) -c easy.c
	$(CC) -o libez.so -shared easy.o
	$(CC) -s test.c -L. -lez -lm
	$(CC) -o test1.exe -s test1.c
	$(CC) -o test2.exe -s test2.c
	$(CC) -o test2s.exe -static -s test2.c
	$(CXX) -o test3.exe -s -L. test3.cc
	$(CXX) -o test3s.exe -static -s -L. test3.cc
	$(CXX) -o tough.o -Dmain=lib_main -c test3.cc
	$(CXX) -o libtg.so -shared tough.o
	$(CXX) -o tough_p.o -Dmain=lib_main -fPIC -DPIC -c test3.cc
	$(CXX) -o libtg_p.so -shared -fPIC -DPIC tough_p.o
	$(CXX) -o test4.exe -s -L. test4.cc -ltg
	$(CXX) -o test4pic.exe -s -L. test4.cc -ltg_p

clean:
	del a.exe
	del a.out
	del easy.o
	del libez.so
	del test1.exe
	del test2.exe
	del test2s.exe
	del test3.exe
	del test3s.exe
	del test4.exe
	del test4pic.exe
	del tough.o
	del tough_p.o
	del libtg.so
	del libtg_p.so
