include ../../Makefile.site

GOAL = loader

default: $(GOAL)

RIPLIBS =  -lrip

defs: $(RIPDEFS)
	cd ../../defs; $(MAKE); cd ../bin/load

modules:
	cd ../../modules; $(MAKE); cd ../bin/load

$(GOAL): $(GOAL).o
	$(CC) -o $(GOAL) $(GOAL).o $(LFLAGS) $(RIPLIBS) $(LIBS)
	@echo done 

$(GOAL).o: $(GOAL).c $(HEADERS)
	$(CC) -c $(CFLAGS) $(GOAL).c


# Redundant rules
compile: $(GOAL).o 

link: $(GOAL)

# To use purify
purify: $(GOAL).o
	purify $(CC) -o $(GOAL) $(GOAL).o $(LFLAGS)  $(RIPLIBS) $(LIBS)

clean:
	${RM} core *.o $(GOAL)

