File: Makefile

package info (click to toggle)
nws 2.11-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,700 kB
  • ctags: 2,820
  • sloc: ansic: 28,849; sh: 3,289; java: 1,205; makefile: 697; perl: 12
file content (50 lines) | stat: -rw-r--r-- 1,251 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#
# Makefile for Sensor
#
# $Id: Makefile,v 1.31 2004/11/09 21:12:26 graziano Exp $
#

# include common variables
include ../Makedefs

# objects we create here
OBJS	=		$(buildobjdir)/clique_protocol.o \
			$(buildobjdir)/experiments.o \
			$(buildobjdir)/periodic.o \
			$(buildobjdir)/sensor.o \
			$(buildobjdir)/nws_sensor.o \
			$(buildobjdir)/skills.o
# ... and objects we depend upon
OBJS	+=		$(SENSORS_OBJS) \
			$(buildobjdir)/register.o \
			$(buildobjdir)/nws_api.o \
			$(buildobjdir)/host_protocol.o

# library we depend upon
DEP_LIB	=		$(buildlibdir)/libNwsPortability.a

PROGRAMS =		$(buildbindir)/nws_sensor 

.PHONY: all clean dist install

all: $(OBJS) $(PROGRAMS)

clean:
	@${RM} -f $(OBJS) 

dist:
	@$(INSTALL) -d  $(DIST_ROOT)/Sensor
	@$(CP) Makefile *.1 *.c $(DIST_ROOT)/Sensor

install:
	@echo "Installing sensors ..."
	@$(CP) $(PROGRAMS) $(bindir)
	@echo "Install sensors man page ..."
	@$(CP) *.1 $(mandir)/man1

$(PROGRAMS): $(OBJS) $(DEP_LIB)
	$(CC) -o $(PROGRAMS) $(OBJS) $(LDFLAGS) $(DEP_LIB)

# Compilation rules for C.
$(buildobjdir)/%.o : %.c ../Include/*.h $(buildincdir)/*.h
	$(CC) $(INCLUDES) -IExpFS -IExpCPU -IExpMemory -IExpTcpBw -IExpConnect -IExpAvail -IExpStart -IExpDisk -IExpMemorySpeed $(CFLAGS) -c $< -o $@