aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios-contrib/demos/various/RT-Win32-TriBuf/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios-contrib/demos/various/RT-Win32-TriBuf/Makefile')
-rw-r--r--lib/chibios-contrib/demos/various/RT-Win32-TriBuf/Makefile152
1 files changed, 152 insertions, 0 deletions
diff --git a/lib/chibios-contrib/demos/various/RT-Win32-TriBuf/Makefile b/lib/chibios-contrib/demos/various/RT-Win32-TriBuf/Makefile
new file mode 100644
index 000000000..b8137683d
--- /dev/null
+++ b/lib/chibios-contrib/demos/various/RT-Win32-TriBuf/Makefile
@@ -0,0 +1,152 @@
1#
2# !!!! Do NOT edit this makefile with an editor which replace tabs by spaces !!!!
3#
4##############################################################################################
5#
6# On command line:
7#
8# make all = Create project
9#
10# make clean = Clean project files.
11#
12# To rebuild project do "make clean" and "make all".
13#
14
15##############################################################################################
16# Start of default section
17#
18
19TRGT = mingw32-
20CC = $(TRGT)gcc
21AS = $(TRGT)gcc -x assembler-with-cpp
22
23# List all default C defines here, like -D_DEBUG=1
24DDEFS = -DSIMULATOR
25
26# List all default ASM defines here, like -D_DEBUG=1
27DADEFS =
28
29# List all default directories to look for include files here
30DINCDIR =
31
32# List the default directory to look for the libraries here
33DLIBDIR =
34
35# List all default libraries here
36DLIBS = -lws2_32
37
38#
39# End of default section
40##############################################################################################
41
42##############################################################################################
43# Start of user section
44#
45
46# Define project name here
47PROJECT = ch
48
49# Define linker script file here
50LDSCRIPT =
51
52# List all user C define here, like -D_DEBUG=1
53UDEFS =
54
55# Define ASM defines here
56UADEFS =
57
58# Imported source files
59CHIBIOS = ../../../../ChibiOS
60CHIBIOS_CONTRIB = $(CHIBIOS)/../ChibiOS-Contrib
61include $(CHIBIOS)/os/hal/boards/simulator/board.mk
62include $(CHIBIOS)/os/hal/hal.mk
63include $(CHIBIOS)/os/hal/ports/simulator/win32/platform.mk
64include $(CHIBIOS)/os/hal/osal/rt-nil/osal.mk
65include $(CHIBIOS)/os/common/ports/SIMIA32/compilers/GCC/port.mk
66include $(CHIBIOS)/os/rt/rt.mk
67include $(CHIBIOS)/test/rt/test.mk
68
69# List C source files here
70SRC = $(PORTSRC) \
71 $(KERNSRC) \
72 $(TESTSRC) \
73 $(HALSRC) \
74 $(OSALSRC) \
75 $(PLATFORMSRC) \
76 $(BOARDSRC) \
77 $(CHIBIOS_CONTRIB)/os/various/tribuf.c \
78 main.c \
79 # eol
80
81# List ASM source files here
82ASRC =
83
84# List all user directories here
85UINCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
86 $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \
87 $(CHIBIOS_CONTRIB)/os/various/ \
88 # eol
89
90# List the user directory to look for the libraries here
91ULIBDIR =
92
93# List all user libraries here
94ULIBS =
95
96# Define optimisation level here
97OPT = -ggdb -O2
98
99#
100# End of user defines
101##############################################################################################
102
103INCDIR = $(patsubst %,-I%,$(DINCDIR) $(UINCDIR))
104LIBDIR = $(patsubst %,-L%,$(DLIBDIR) $(ULIBDIR))
105DEFS = $(DDEFS) $(UDEFS)
106ADEFS = $(DADEFS) $(UADEFS)
107OBJS = $(ASRC:.s=.o) $(SRC:.c=.o)
108LIBS = $(DLIBS) $(ULIBS)
109
110LDFLAGS = -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch $(LIBDIR)
111ASFLAGS = -Wa,-amhls=$(<:.s=.lst) $(ADEFS)
112CPFLAGS = -Wall -Wextra -Wundef -Wstrict-prototypes -fverbose-asm -Wa,-alms=$(<:.c=.lst) $(DEFS)
113
114# Generate dependency information
115CPFLAGS += -MD -MP -MF .dep/$(@F).d
116
117#
118# makefile rules
119#
120
121all: $(OBJS) $(PROJECT).exe
122
123%.o : %.c
124 $(CC) -c $(OPT) $(CPFLAGS) -I . $(INCDIR) $< -o $@
125
126%.o : %.s
127 $(AS) -c $(OPT) $(ASFLAGS) $< -o $@
128
129%exe: $(OBJS)
130 $(CC) $(OPT) $(OBJS) $(LDFLAGS) $(LIBS) -o $@
131
132gcov:
133 -mkdir gcov
134 $(COV) -u $(subst /,\,$(SRC))
135 -mv *.gcov ./gcov
136
137clean:
138 -rm -f $(OBJS)
139 -rm -f $(PROJECT).exe
140 -rm -f $(PROJECT).map
141 -rm -f $(SRC:.c=.c.bak)
142 -rm -f $(SRC:.c=.lst)
143 -rm -f $(ASRC:.s=.s.bak)
144 -rm -f $(ASRC:.s=.lst)
145 -rm -fR .dep
146
147#
148# Include the dependency files, should be the last of the makefile
149#
150-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
151
152# *** EOF ***