include ../../Makefile.in.$(OSTYPE)

INC = ../../include
LIB = ../../lib

SOURCES = $(shell ls *.c)
HEADERS = $(shell ls ../../include/*.h)
DEFS = $(shell ls ../../include/*.def)
# Get the module name.
MODULE = $(shell basename `pwd`)

$(LIB)/librip$(MODULE).a: $(HEADERS) $(SOURCES) $(DEFS)
	$(CC) -c $(CFLAGS) $(SOURCES) $(INCDIRS)
	ar -r $(LIB)/librip$(MODULE).a *.o $(LIBS)

clean:
	$(RM) core *.o $(LIB)/librip$(MODULE).a

all: .
