# Comment/uncomment the following line to disable/enable debugging
#DEBUG = y


# This Makefile has been simplified as much as possible, by putting all
# generic material, independent of this specific directory, into
# ../Rules.make. Read that file for details



TOPDIR  := $(shell cd ..; pwd)
include $(TOPDIR)/Rules.make

DEBUG=y
# Add your debugging flag (or not) to CFLAGS
ifeq ($(DEBUG),y)
  DEBFLAGS = -O -g -DSCULL_DEBUG # "-O" is needed to expand inlines
else
  DEBFLAGS = -O2
endif

CFLAGS += $(DEBFLAGS)
CFLAGS += -I..

TARGET_LIBS = ../nookslib/nooks-syscalls.o
TARGET = systest
OBJS = $(TARGET).o
SRC = systest.c

all: .depend $(TARGET)

$(TARGET): $(OBJS) $(TARGET_LIBS)
	$(CC) $(CFLAGS) -o $(TARGET) $(OBJS) $(TARGET_LIBS)


install:
	install -d $(INSTALLDIR)
	install -c $(TARGET).o $(INSTALLDIR)

clean:
	rm -f *.o *~ core .depend

depend .depend dep:
	$(CC) $(CFLAGS) -M *.c > $@


ifeq (.depend,$(wildcard .depend))
include .depend
endif
