ifndef PATH_LIST
  PATH_LIST = ../../path_list
endif
include $(PATH_LIST)


CC = gcc
DEBUG =
#DEBUG = -DDEBUG
CFLAGS = -Wall -g -O -D_FILE_OFFSET_BITS=64 $(DEBUG)
HEADERS = dac.h ../common/util.h
OBJS = ../common/util.o
DAC = dac


$(DAC): $(OBJS)

dac.o: $(HEADERS)

clean:
	rm -rf $(OBJS) $(DAC) *.o test.log log.* plus minus

test: $(DAC)
	sudo chown root ../common/img/*.img
	sh test.sh

install: $(DAC)
	@( if [ ! -d $(BIN_DIR) ]; then \
	   echo "Making directory " $(BIN_DIR); \
	   mkdir -p $(BIN_DIR); \
	   fi )
	install $(DAC) $(BIN_DIR)

uninstall:
	rm -rf $(BIN_DIR)/$(DAC)
