include $(ROOT)/usr/include/make/commondefs
include $(ROOT)/usr/include/make/IOSEdefs
include $(COMMONRULES)
TARGETS = iose

CFILES = initc.c \
				 thread.c\
				 iose.c \
				 emu_thread.c \
				 emu_startprog.c \
				 emu_event.c \
				 idle.c \
				 message.c \
				 alloc.c  \
				 emu_timer.c \
				 timer.c \
				 utils.c\
				 iobuf_init.c\
				 iobuf_ops.c\
				 iobuf_debug.c\
				 emu_iobuf.c \
				 ipcemu.c \
				 ipcsrv.c \
				 resource.c

LDFLAGS += -ldl -liossyscall 
LCINCS += -I /usr/local/libusb/include

BUILDER := $(shell whoami)
ifeq ($(BUILDER), craig)
    CFLAGS += -g
endif


default: $(TARGETS)
	
exports install: default
	$(INSTALL) -p $(TARGETS) $(ROOT)/usr/bin/iose


iose: $(OBJECTS)

sdk-install: default
	$(INSTALL) -d $(SDK_BIN)
	$(INSTALL) $(TARGETS) $(SDK_BIN)
