##############################################################################
|
##############################################################################
|
# Microwindows template Makefile
|
# Microwindows template Makefile
|
# Copyright (c) 2000, 2002 Martin Jolicoeur, Greg Haerr
|
# Copyright (c) 2000, 2002 Martin Jolicoeur, Greg Haerr
|
##############################################################################
|
##############################################################################
|
|
|
ifndef TOP
|
ifndef TOP
|
TOP = ../..
|
TOP = ../..
|
CONFIG = $(TOP)/config
|
CONFIG = $(TOP)/config
|
endif
|
endif
|
|
|
include $(CONFIG)
|
include $(CONFIG)
|
|
|
VPATH := $(TOP)/demos/nxscribble
|
VPATH := $(TOP)/demos/nxscribble
|
|
|
######################## Additional Flags section ############################
|
######################## Additional Flags section ############################
|
|
|
# Directories list for header files
|
# Directories list for header files
|
INCLUDEDIRS += -I$(VPATH)
|
INCLUDEDIRS += -I$(VPATH)
|
# Defines for preprocessor
|
# Defines for preprocessor
|
DEFINES +=
|
DEFINES +=
|
|
|
# Compilation flags for C files OTHER than include directories
|
# Compilation flags for C files OTHER than include directories
|
CFLAGS +=
|
CFLAGS +=
|
# Preprocessor flags OTHER than defines
|
# Preprocessor flags OTHER than defines
|
CPPFLAGS +=
|
CPPFLAGS +=
|
# Linking flags
|
# Linking flags
|
LDFLAGS +=
|
LDFLAGS +=
|
|
|
############################# targets section ################################
|
############################# targets section ################################
|
|
|
ifeq ($(NANOX), Y)
|
ifeq ($(NANOX), Y)
|
|
|
# If you want to create a library with the objects files, define the name here
|
# If you want to create a library with the objects files, define the name here
|
LIBNAME =
|
LIBNAME =
|
|
|
# List of objects to compile
|
# List of objects to compile
|
OBJS = nxscribble.o scribwidget.o\
|
OBJS = nxscribble.o scribwidget.o\
|
hre_api.o li_recognizer.o bitvector.o matrix.o sc.o util.o
|
hre_api.o li_recognizer.o bitvector.o matrix.o sc.o util.o
|
|
|
ifeq ($(ARCH), ECOS)
|
ifeq ($(ARCH), ECOS)
|
DEFINES += -DREC_DEFAULT_USER_DIR=\"/bin\"
|
DEFINES += -DREC_DEFAULT_USER_DIR=\"/bin\"
|
TARGET = $(BUILD)/bin/nxscribble.o
|
TARGET = $(BUILD)/bin/nxscribble.o
|
else
|
else
|
TARGET = $(BUILD)/bin/nxscribble
|
TARGET = $(BUILD)/bin/nxscribble
|
endif
|
endif
|
|
|
all: default $(TARGET) support
|
all: default $(TARGET) support
|
|
|
support: letters.cl digits.cl punc.cl
|
support: letters.cl digits.cl punc.cl
|
$(CP) $^ $(BUILD)/bin
|
$(CP) $^ $(BUILD)/bin
|
|
|
endif
|
endif
|
|
|
######################### Makefile.rules section #############################
|
######################### Makefile.rules section #############################
|
|
|
include $(TOP)/Makefile.rules
|
include $(TOP)/Makefile.rules
|
|
|
######################## Tools targets section ###############################
|
######################## Tools targets section ###############################
|
|
|
ifeq ($(SHAREDLIBS), Y)
|
ifeq ($(SHAREDLIBS), Y)
|
$(BUILD)/bin/nxscribble: $(OBJS) $(NANOXCLIENTLIBS) $(BUILD)/config
|
$(BUILD)/bin/nxscribble: $(OBJS) $(NANOXCLIENTLIBS) $(BUILD)/config
|
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@ $(CCNANOXCLIENTLIBS) -lm
|
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@ $(CCNANOXCLIENTLIBS) -lm
|
else
|
else
|
ifeq ($(ARCH), ECOS)
|
ifeq ($(ARCH), ECOS)
|
$(BUILD)/bin/nxscribble.o: $(OBJS) $(BUILD)/config
|
$(BUILD)/bin/nxscribble.o: $(OBJS) $(BUILD)/config
|
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -Wl,-r -Wl,--defsym -Wl,nxscribble_main=main -o XX.o
|
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -Wl,-r -Wl,--defsym -Wl,nxscribble_main=main -o XX.o
|
$(NM) XX.o | grep -v _main | grep ' T' | awk -f $(TOP)/ecos/retain.awk | xargs $(OBJCOPY) XX.o $@
|
$(NM) XX.o | grep -v _main | grep ' T' | awk -f $(TOP)/ecos/retain.awk | xargs $(OBJCOPY) XX.o $@
|
rm -f XX.o
|
rm -f XX.o
|
else
|
else
|
$(BUILD)/bin/nxscribble: $(OBJS) $(NANOXCLIENTLIBS) $(BUILD)/config
|
$(BUILD)/bin/nxscribble: $(OBJS) $(NANOXCLIENTLIBS) $(BUILD)/config
|
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@ $(NANOXCLIENTLIBS) -lm
|
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@ $(NANOXCLIENTLIBS) -lm
|
endif
|
endif
|
endif
|
endif
|
|
|