include ../../Makefile.site

# Get the module name.
MODULE  = $(shell basename `pwd`)

COBJS := $(patsubst %.c,%.o,$(wildcard *.c))

CXXOBJS := $(patsubst %.cc,%.o,$(wildcard *.cc))

%.o: %.c
	$(CC) -c $(CFLAGS) $<

%.o: %.cc
	$(CXX) -c $(CFLAGS) $<

$(RIPLIBDIR)/librip$(MODULE).a: $(HEADERS) $(RIPDEFS) $(COBJS) $(CXXOBJS)
	ar -r $(RIPLIBDIR)/librip$(MODULE).a *.o
	ar -r $(RIPLIBDIR)/librip.a *.o

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

all: .

