source: nanoscale/trunk/Makefile.in

Last change on this file was 6624, checked in by ldelgass, 6 years ago

Some minor cleanups to sync with 1.0 branch

File size: 2.0 KB
Line 
1USE_TCL_CONFIG  = #yes
2WANT_TRACE      = #yes
3
4CC              = @CC@
5CFLAGS          = @CFLAGS@
6EXTRA_CFLAGS    = -Wall
7CC_SWITCHES     = $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDES) $(DEFINES)
8LDFLAGS         = @LDFLAGS@
9
10bindir          = @bindir@
11datadir         = @datadir@
12datarootdir     = @datarootdir@
13exec_prefix     = @exec_prefix@
14includedir      = @includedir@
15libdir          = @libdir@
16mandir          = @mandir@
17prefix          = @prefix@
18srcdir          = @srcdir@
19
20VPATH           = $(srcdir)
21
22INSTALL         = @INSTALL@
23INSTALL_PROGRAM = ${INSTALL} -m 0555
24INSTALL_DATA    = ${INSTALL} -m 0444
25INSTALL_SCRIPT  = ${INSTALL} -m 0444
26RM              = rm -f
27
28SERVER_OBJS     = server.o
29ifdef USE_TCL_CONFIG
30SERVER_OBJS     += tclparser.o
31else
32SERVER_OBJS     += configparser.o
33endif
34CLIENT_OBJS     = client.o clientlib.o
35
36TCL_LIB_SPEC    = @TCL_LIB_SPEC@
37TCL_INC_SPEC    = @TCL_INC_SPEC@
38LD_RUN_PATH     = $(libdir)
39LOGDIR          = @LOGDIR@
40SVN_VERSION     = $(shell svnversion $(srcdir) | sed 's/Unversioned directory/unknown/')
41
42ifdef WANT_TRACE
43DEFINES         = -DWANT_TRACE
44endif
45ifdef USE_TCL_CONFIG
46CONFIGFILE      = renderservers.tcl
47DEFINES         = -DTCL_CONFIG
48else
49CONFIGFILE      = renderservers.cfg
50DEFINES         =
51endif
52DEFINES         += -DSERVERSFILE=\"$(libdir)/$(CONFIGFILE)\" \
53                -DSVN_VERSION=\"$(SVN_VERSION)\" \
54                -DLOGDIR=\"$(LOGDIR)\"
55INCLUDES        = -I.
56ifdef USE_TCL_CONFIG
57INCLUDES        += $(TCL_INC_SPEC)
58endif
59ifdef USE_TCL_CONFIG
60LIBS            = $(TCL_LIB_SPEC) -Wl,-rpath,$(LD_RUN_PATH)
61else
62LIBS            =
63endif
64
65.PHONY: all install clean distclean
66
67TARGETS         = nanoscale
68
69all: $(TARGETS)
70
71nanoscale: $(SERVER_OBJS)
72        $(CC) $(CC_SWITCHES) -o $@ $^ $(LIBS)
73
74install: nanoscale $(CONFIGFILE) start_nanoscale.sh
75        $(INSTALL_PROGRAM) -D nanoscale $(bindir)/nanoscale
76        $(INSTALL_PROGRAM) start_nanoscale.sh $(bindir)/start_nanoscale.sh
77        $(INSTALL_DATA) $(CONFIGFILE) $(libdir)
78
79client: $(CLIENT_OBJS)
80
81.c.o:
82        $(CC) $(CC_SWITCHES) -o $@ -c $<
83
84clean:
85        $(RM) -r a.out *.o *~ core* $(TARGETS) .deps/*.d
86
87distclean: clean
88        $(RM) -r autom4te.cache
89        $(RM) Makefile config.cache config.log config.status config.h $(CONFIGFILE) start_nanoscale.sh
90
91server.o: server.h
92configparser.o: server.h
93tclparser.o: server.h
Note: See TracBrowser for help on using the repository browser.