1 ##############################################################################
2 # Microwindows template Makefile
3 # Copyright (c) 2000, 2002 Martin Jolicoeur, Greg Haerr
4 ##############################################################################
15 ######################## Additional Flags section ############################
17 # Directories list for header files
20 # Defines for preprocessor
21 ifeq ($(LINK_APP_INTO_SERVER), Y)
22 DEFINES += -DNONETWORK=1
25 # Compilation flags for C files OTHER than include directories
27 # Preprocessor flags OTHER than defines
32 ############################# targets section ################################
36 # If you want to create a library with the objects files, define the name here
38 LIBNAMESO = libnano-X.so
41 NANOXFILES = srvmain.o srvfunc.o srvutil.o srvevent.o srvclip.o
43 UTILFILES = nxdraw.o nxutil.o
45 ifeq ($(LINK_APP_INTO_SERVER), Y)
46 NANOXFILES += $(UTILFILES)
49 NANOXFILES += $(NETFILES)
50 OBJS = client.o clientfb.o nxproto.o error.o $(UTILFILES)
52 TARGET = $(BUILD)/bin/nano-X.o
54 TARGET = $(BUILD)/bin/nano-X
56 all: default $(TARGET)
61 ######################### Makefile.rules section #############################
63 include $(TOP)/Makefile.rules
65 ######################## Tools targets section ###############################
68 ifeq ($(SHAREDLIBS), Y)
69 $(BUILD)/bin/nano-X: $(NANOXFILES) $(NANOXSERVERLIBS) $(TOP)/config
70 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(NANOXFILES) $(CCNANOXSERVERLIBS)
72 $(BUILD)/bin/nano-X.o: $(OBJS) $(NANOXFILES) $(NANOXSERVERLIBS) $(TOP)/config
73 # $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(NANOXFILES) $(NANOXSERVERLIBS) -Wl,-r -Wl,--retain-symbols-file -Wl,nanox.syms -Wl,--defsym -Wl,nanox_main=main -o XX.o
74 $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(NANOXFILES) $(NANOXSERVERLIBS) -Wl,-r -Wl,--defsym -Wl,nanox_main=main -o XX.o
75 $(NM) XX.o | grep -v _main | grep -v Gr | grep -v nx | grep ' T' | awk -f $(TOP)/ecos/retain.awk | xargs $(OBJCOPY) XX.o $@
78 $(BUILD)/bin/nano-X: $(NANOXFILES) $(NANOXSERVERLIBS) $(TOP)/config
79 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(NANOXFILES) $(NANOXSERVERLIBS) $(LDFLAGS)