##############################################################################
|
##############################################################################
|
# 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)/nanox
|
VPATH := $(TOP)/nanox
|
|
|
######################## Additional Flags section ############################
|
######################## Additional Flags section ############################
|
|
|
# Directories list for header files
|
# Directories list for header files
|
INCLUDEDIRS +=
|
INCLUDEDIRS +=
|
|
|
# Defines for preprocessor
|
# Defines for preprocessor
|
ifeq ($(LINK_APP_INTO_SERVER), Y)
|
ifeq ($(LINK_APP_INTO_SERVER), Y)
|
DEFINES += -DNONETWORK=1
|
DEFINES += -DNONETWORK=1
|
endif
|
endif
|
|
|
# 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 = libnano-X.a
|
LIBNAME = libnano-X.a
|
LIBNAMESO = libnano-X.so
|
LIBNAMESO = libnano-X.so
|
|
|
# Nano-X server files
|
# Nano-X server files
|
NANOXFILES = srvmain.o srvfunc.o srvutil.o srvevent.o srvclip.o
|
NANOXFILES = srvmain.o srvfunc.o srvutil.o srvevent.o srvclip.o
|
NETFILES = srvnet.o
|
NETFILES = srvnet.o
|
UTILFILES = nxdraw.o nxutil.o
|
UTILFILES = nxdraw.o nxutil.o
|
|
|
ifeq ($(LINK_APP_INTO_SERVER), Y)
|
ifeq ($(LINK_APP_INTO_SERVER), Y)
|
NANOXFILES += $(UTILFILES)
|
NANOXFILES += $(UTILFILES)
|
OBJS = $(NANOXFILES)
|
OBJS = $(NANOXFILES)
|
else
|
else
|
NANOXFILES += $(NETFILES)
|
NANOXFILES += $(NETFILES)
|
OBJS = client.o clientfb.o nxproto.o error.o $(UTILFILES)
|
OBJS = client.o clientfb.o nxproto.o error.o $(UTILFILES)
|
ifeq ($(ARCH), ECOS)
|
ifeq ($(ARCH), ECOS)
|
TARGET = $(BUILD)/bin/nano-X.o
|
TARGET = $(BUILD)/bin/nano-X.o
|
else
|
else
|
TARGET = $(BUILD)/bin/nano-X
|
TARGET = $(BUILD)/bin/nano-X
|
endif
|
endif
|
all: default $(TARGET)
|
all: default $(TARGET)
|
endif
|
endif
|
|
|
endif
|
endif
|
|
|
######################### Makefile.rules section #############################
|
######################### Makefile.rules section #############################
|
|
|
include $(TOP)/Makefile.rules
|
include $(TOP)/Makefile.rules
|
|
|
######################## Tools targets section ###############################
|
######################## Tools targets section ###############################
|
|
|
# Server binary ...
|
# Server binary ...
|
ifeq ($(SHAREDLIBS), Y)
|
ifeq ($(SHAREDLIBS), Y)
|
$(BUILD)/bin/nano-X: $(NANOXFILES) $(NANOXSERVERLIBS) $(TOP)/config
|
$(BUILD)/bin/nano-X: $(NANOXFILES) $(NANOXSERVERLIBS) $(TOP)/config
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(NANOXFILES) $(CCNANOXSERVERLIBS)
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(NANOXFILES) $(CCNANOXSERVERLIBS)
|
else
|
else
|
$(BUILD)/bin/nano-X.o: $(OBJS) $(NANOXFILES) $(NANOXSERVERLIBS) $(TOP)/config
|
$(BUILD)/bin/nano-X.o: $(OBJS) $(NANOXFILES) $(NANOXSERVERLIBS) $(TOP)/config
|
# $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(NANOXFILES) $(NANOXSERVERLIBS) -Wl,-r -Wl,--retain-symbols-file -Wl,nanox.syms -Wl,--defsym -Wl,nanox_main=main -o XX.o
|
# $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(NANOXFILES) $(NANOXSERVERLIBS) -Wl,-r -Wl,--retain-symbols-file -Wl,nanox.syms -Wl,--defsym -Wl,nanox_main=main -o XX.o
|
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(NANOXFILES) $(NANOXSERVERLIBS) -Wl,-r -Wl,--defsym -Wl,nanox_main=main -o XX.o
|
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(NANOXFILES) $(NANOXSERVERLIBS) -Wl,-r -Wl,--defsym -Wl,nanox_main=main -o XX.o
|
$(NM) XX.o | grep -v _main | grep -v Gr | grep -v nx | grep ' T' | awk -f $(TOP)/ecos/retain.awk | xargs $(OBJCOPY) XX.o $@
|
$(NM) XX.o | grep -v _main | grep -v Gr | grep -v nx | grep ' T' | awk -f $(TOP)/ecos/retain.awk | xargs $(OBJCOPY) XX.o $@
|
# rm -f XX.o
|
# rm -f XX.o
|
|
|
$(BUILD)/bin/nano-X: $(NANOXFILES) $(NANOXSERVERLIBS) $(TOP)/config
|
$(BUILD)/bin/nano-X: $(NANOXFILES) $(NANOXSERVERLIBS) $(TOP)/config
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(NANOXFILES) $(NANOXSERVERLIBS) $(LDFLAGS)
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(NANOXFILES) $(NANOXSERVERLIBS) $(LDFLAGS)
|
endif
|
endif
|
|
|