mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
updated Makefile for new Doxygen setup
simplified dependency autogeneration git-svn-id: https://zerberus.eonerc.rwth-aachen.de:8443/svn/s2ss/trunk@51 8ec27952-4edc-4aab-86aa-e87bb2611832
This commit is contained in:
parent
14fb981a3d
commit
20d90dd9dd
1 changed files with 28 additions and 22 deletions
50
Makefile
50
Makefile
|
@ -1,38 +1,44 @@
|
|||
TARGETS = server send receive random test
|
||||
SRCS = server.c send.c receive.c random.c node.c path.c utils.c msg.c cfg.c if.c
|
||||
|
||||
SRCS = server.c send.c receive.c random.c node.c path.c utils.c msg.c cfg.c caps.c
|
||||
VPATH = src
|
||||
|
||||
CC = gcc
|
||||
RM = rm -f
|
||||
|
||||
GIT_TAG = $(shell git describe --tags --abbrev=0)
|
||||
GIT_REV = $(shell git rev-parse --short HEAD)
|
||||
|
||||
V ?= 4
|
||||
|
||||
LDFLAGS = -pthread -lrt -lm -lconfig -lnl-3 -lnl-route-3
|
||||
CFLAGS = -g -std=c99 -Iinclude/ -D_XOPEN_SOURCE=500 -D_GNU_SOURCE -DV=$(V)
|
||||
CFLAGS += -D__GIT_REV__='"$(GIT_REV)"' -D__GIT_TAG__='"$(GIT_TAG)"'
|
||||
|
||||
.PHONY: all clean doc
|
||||
|
||||
# Default target: build everything
|
||||
all: $(TARGETS)
|
||||
|
||||
server: node.o msg.o utils.o path.o cfg.o caps.o
|
||||
# Dependencies for individual binaries
|
||||
server: node.o msg.o utils.o path.o cfg.o
|
||||
send: node.o msg.o utils.o
|
||||
receive: node.o msg.o utils.o
|
||||
random: node.o msg.o utils.o
|
||||
test: node.o msg.o utils.o
|
||||
|
||||
%.d: %.c
|
||||
$(CC) -MM $(CFLAGS) $< -o $@
|
||||
VPATH = src
|
||||
|
||||
CC = gcc
|
||||
RM = rm -f
|
||||
DOXY = doxygen
|
||||
|
||||
# Debug level (if not set via 'make V=?')
|
||||
V ?= 6
|
||||
|
||||
# Some details about the compiled version
|
||||
GIT_TAG = $(shell git describe --tags --abbrev=0)
|
||||
GIT_REV = $(shell git rev-parse --short HEAD)
|
||||
|
||||
# Compiler and Linker flags
|
||||
LDFLAGS = -pthread -lrt -lm -lconfig -lcap
|
||||
CFLAGS = -g -std=c99 -Iinclude/ -MMD
|
||||
CFLAGS += -D_XOPEN_SOURCE=500 -D_GNU_SOURCE -DV=$(V)
|
||||
CFLAGS += -D__GIT_REV__='"$(GIT_REV)"' -D__GIT_TAG__='"$(GIT_TAG)"'
|
||||
|
||||
.PHONY: all clean doc
|
||||
|
||||
clean:
|
||||
$(RM) *~ *.o *.d
|
||||
$(RM) $(TARGETS)
|
||||
|
||||
doc:
|
||||
$(MAKE) -C $@
|
||||
$(DOXY)
|
||||
$(MAKE) -C doc/latex
|
||||
|
||||
-include $(SRCS:.c=.d)
|
||||
# Include auto-generated dependencies
|
||||
-include $(wildcard *.d)
|
||||
|
|
Loading…
Add table
Reference in a new issue