CFLAGS=-O2 -g -Wall -W -pipe all: test.exe my.dll my.dll: dll.o libtest.a gcc -o my.dll -shared dll.o libtest.a dll.o: dll.c gcc $(CFLAGS) -c dll.c libtest.a: test.o dlltool -l libtest.a test.o # gcc -o junk -shared -Wl,--out-implib -Wl,libtest.a test.o # rm junk.exe test.o: test.c gcc $(CFLAGS) -c test.c test.exe: test.o gcc -o test test.o