|
From: William S. <wil...@gm...> - 2010-11-26 10:25:07
|
Keith, this version of your makefile works, by kludging on $(CURDIR).
Not sure why I needed quotes for copy though.
Thanks
Bill
rrand: librand.a
CC = gcc
libdir = c:\mingw\local\lib
includedir = c:\mingw\local\include
%.o: %.c
$(CC) -c $<
rand.o: rand.c rand.h
librand.a: rand.o # and any other objects you wish it to include
del $@
ar rcvs $@ $^
install:
copy "$(CURDIR)\librand.a" $(libdir)
copy "$(CURDIR)\rand.h" $(includedir)
clean:
del $(CURDIR)\*.o
distclean: clean
del $(CURDIR)\*.a
|