CC        = gcc
DCC       = diet gcc

PDIET     = /opt/diet/lib

CFLAGS    = -Wall -O2

LDFLAGS   = -nostdlib -rdynamic
LIBS      = $(PDIET)/libdietc.so -lgcc

DYN_LINK  = -Wl,-rpath,$(PDIET),-dynamic-linker,$(PDIET)/diet-linux.so

OBJS      = 

dyn_prog: $(OBJS)
	$(CC) $(LDFLAGS) -o $@ $(PDIET)/start.o $(OBJS) $(LIBS) $(DYN_LINK)

