]> git.karo-electronics.de Git - karo-tx-redboot.git/blob - packages/services/gfx/mw/v2_0/src/nanox/Makefile
Initial revision
[karo-tx-redboot.git] / packages / services / gfx / mw / v2_0 / src / nanox / Makefile
1 ##############################################################################
2 # Microwindows template Makefile
3 # Copyright (c) 2000, 2002 Martin Jolicoeur, Greg Haerr
4 ##############################################################################
5
6 ifndef TOP
7 `TOP = ..
8 CONFIG = $(TOP)/config
9 endif
10
11 include $(CONFIG)
12
13 VPATH := $(TOP)/nanox
14
15 ######################## Additional Flags section ############################
16
17 # Directories list for header files
18 INCLUDEDIRS +=
19
20 # Defines for preprocessor
21 ifeq ($(LINK_APP_INTO_SERVER), Y)
22 DEFINES += -DNONETWORK=1
23 endif
24
25 # Compilation flags for C files OTHER than include directories
26 CFLAGS +=
27 # Preprocessor flags OTHER than defines
28 CPPFLAGS +=
29 # Linking flags
30 LDFLAGS +=
31
32 ############################# targets section ################################
33
34 ifeq ($(NANOX), Y)
35
36 # If you want to create a library with the objects files, define the name here
37 LIBNAME = libnano-X.a
38 LIBNAMESO = libnano-X.so
39
40 # Nano-X server files
41 NANOXFILES = srvmain.o srvfunc.o srvutil.o srvevent.o srvclip.o
42 NETFILES = srvnet.o
43 UTILFILES = nxdraw.o nxutil.o
44
45 ifeq ($(LINK_APP_INTO_SERVER), Y)
46 NANOXFILES += $(UTILFILES)
47 OBJS = $(NANOXFILES)
48 else
49 NANOXFILES += $(NETFILES)
50 OBJS = client.o clientfb.o nxproto.o error.o $(UTILFILES)
51 ifeq ($(ARCH), ECOS) 
52 TARGET = $(BUILD)/bin/nano-X.o
53 else
54 TARGET = $(BUILD)/bin/nano-X
55 endif
56 all: default $(TARGET)
57 endif
58
59 endif
60
61 ######################### Makefile.rules section #############################
62
63 include $(TOP)/Makefile.rules
64
65 ######################## Tools targets section ###############################
66
67 # Server binary ...
68 ifeq ($(SHAREDLIBS), Y)
69 $(BUILD)/bin/nano-X: $(NANOXFILES) $(NANOXSERVERLIBS) $(TOP)/config
70         $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(NANOXFILES) $(CCNANOXSERVERLIBS)
71 else
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 $@
76 #       rm -f XX.o
77
78 $(BUILD)/bin/nano-X: $(NANOXFILES) $(NANOXSERVERLIBS) $(TOP)/config
79         $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(NANOXFILES) $(NANOXSERVERLIBS) $(LDFLAGS)
80 endif