TOPDIR = ../..

include $(TOPDIR)/rules.mk

CPPFLAGS += $(RFRTLIB_CFLAGS) $(RFLIB_CFLAGS)

MODULES = \
  add \
  sub \
  div \
  mult \
  rem \
  div_rem \
  gcd \
  max \
  min \
  neg

SOURCES = $(addsuffix .cc, $(MODULES))
OBJECTS = $(addsuffix .o, $(MODULES))
DEPS = $(addsuffix .dep, $(MODULES))

all:: module.list

module.list: $(OBJECTS)
	 echo $^ >module.list

clean::
	rm -rf *.o *.dep module.list

-include $(DEPS)