bzr branch
http://darksoft.org/webbzr/alps/pcitool
1
by Suren A. Chilingaryan
Initial import |
1 |
# Compiler and default flags
|
2 |
CC ?= gcc |
|
45
by root
North West Logick DMA implementation |
3 |
CFLAGS ?= -O0 |
1
by Suren A. Chilingaryan
Initial import |
4 |
|
5 |
||
6 |
# Defaults for directories
|
|
7 |
ROOTDIR ?= $(shell pwd) |
|
8 |
||
9 |
INCDIR ?= $(ROOTDIR) |
|
10 |
BINDIR ?= $(ROOTDIR) |
|
11 |
LIBDIR ?= $(ROOTDIR) |
|
12 |
OBJDIR ?= $(ROOTDIR) |
|
13 |
DEPENDDIR ?= $(ROOTDIR) |
|
14 |
||
6
by Suren A. Chilingaryan
Initial support for registers, infrastructure only |
15 |
CXXFLAGS += $(addprefix -I ,$(INCDIR)) -fPIC |
7.1.1
by Suren A. Chilingaryan
Initial support of IPECamera protocol |
16 |
CFLAGS += $(addprefix -I ,$(INCDIR)) -fPIC -std=c99 |
1
by Suren A. Chilingaryan
Initial import |
17 |
|
18 |
# Source files in this directory
|
|
19 |
SRC = $(wildcard *.cpp) |
|
20 |
SRCC = $(wildcard *.c) |
|
21 |
||
15
by Suren A. Chilingaryan
Infrastructure for event API |
22 |
SRC += $(wildcard ipecamera/*.cpp) |
23 |
SRCC += $(wildcard ipecamera/*.c) |
|
24 |
||
54
by Suren A. Chilingaryan
Support dynamic registers, support register offsets and multiregisters (bitmasks), list NWL DMA registers |
25 |
SRC += $(wildcard dma/*.cpp) |
26 |
SRCC += $(wildcard dma/*.c) |
|
27 |
||
1
by Suren A. Chilingaryan
Initial import |
28 |
# Corresponding object files
|
29 |
OBJ = $(addprefix $(OBJDIR)/,$(SRC:.cpp=.o)) |
|
30 |
OBJ += $(addprefix $(OBJDIR)/,$(SRCC:.c=.o)) |
|
31 |
||
32 |
# Corresponding dependency files
|
|
33 |
DEPEND = $(addprefix $(DEPENDDIR)/,$(SRC:.cpp=.d)) |
|
34 |
DEPEND += $(addprefix $(DEPENDDIR)/,$(SRCC:.c=.d)) |
|
35 |
||
36 |
# This makes Verbose easier. Just prefix $(Q) to any command
|
|
37 |
ifdef VERBOSE
|
|
38 |
Q ?=
|
|
39 |
else
|
|
40 |
Q ?= @
|
|
41 |
endif
|
|
42 |
||
43 |
###############################################################
|
|
44 |
# Target definitions
|
|
45 |
||
46 |
# Target for automatic dependency generation
|
|
47 |
depend: $(DEPEND) $(DEPENDC); |
|
48 |
||
49 |
# This rule generates a dependency makefile for each source
|
|
50 |
$(DEPENDDIR)/%.d: %.c |
|
51 |
@echo -e "DEPEND \t$<" |
|
52 |
$(Q)$(CC) $(addprefix -I ,$(INCDIR)) -MM -MF $@ \ |
|
53 |
-MT $(OBJDIR)/$(<:.c=.o) -MT $@ $< |
|
54 |
||
55 |
# This includes the automatically
|
|
56 |
# generated dependency files
|
|
57 |
-include $(DEPEND)
|
|
58 |
||
59 |
$(OBJDIR)/%.o: %.c |
|
60 |
@echo -e "CC \t$<" |
|
61 |
$(Q)@$(CC) $(CFLAGS) -c -o $@ $< |