diff options
Diffstat (limited to 'lib/chibios-contrib/demos/various/RT-Win32-TriBuf/Makefile')
-rw-r--r-- | lib/chibios-contrib/demos/various/RT-Win32-TriBuf/Makefile | 152 |
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 | |||
19 | TRGT = mingw32- | ||
20 | CC = $(TRGT)gcc | ||
21 | AS = $(TRGT)gcc -x assembler-with-cpp | ||
22 | |||
23 | # List all default C defines here, like -D_DEBUG=1 | ||
24 | DDEFS = -DSIMULATOR | ||
25 | |||
26 | # List all default ASM defines here, like -D_DEBUG=1 | ||
27 | DADEFS = | ||
28 | |||
29 | # List all default directories to look for include files here | ||
30 | DINCDIR = | ||
31 | |||
32 | # List the default directory to look for the libraries here | ||
33 | DLIBDIR = | ||
34 | |||
35 | # List all default libraries here | ||
36 | DLIBS = -lws2_32 | ||
37 | |||
38 | # | ||
39 | # End of default section | ||
40 | ############################################################################################## | ||
41 | |||
42 | ############################################################################################## | ||
43 | # Start of user section | ||
44 | # | ||
45 | |||
46 | # Define project name here | ||
47 | PROJECT = ch | ||
48 | |||
49 | # Define linker script file here | ||
50 | LDSCRIPT = | ||
51 | |||
52 | # List all user C define here, like -D_DEBUG=1 | ||
53 | UDEFS = | ||
54 | |||
55 | # Define ASM defines here | ||
56 | UADEFS = | ||
57 | |||
58 | # Imported source files | ||
59 | CHIBIOS = ../../../../ChibiOS | ||
60 | CHIBIOS_CONTRIB = $(CHIBIOS)/../ChibiOS-Contrib | ||
61 | include $(CHIBIOS)/os/hal/boards/simulator/board.mk | ||
62 | include $(CHIBIOS)/os/hal/hal.mk | ||
63 | include $(CHIBIOS)/os/hal/ports/simulator/win32/platform.mk | ||
64 | include $(CHIBIOS)/os/hal/osal/rt-nil/osal.mk | ||
65 | include $(CHIBIOS)/os/common/ports/SIMIA32/compilers/GCC/port.mk | ||
66 | include $(CHIBIOS)/os/rt/rt.mk | ||
67 | include $(CHIBIOS)/test/rt/test.mk | ||
68 | |||
69 | # List C source files here | ||
70 | SRC = $(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 | ||
82 | ASRC = | ||
83 | |||
84 | # List all user directories here | ||
85 | UINCDIR = $(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 | ||
91 | ULIBDIR = | ||
92 | |||
93 | # List all user libraries here | ||
94 | ULIBS = | ||
95 | |||
96 | # Define optimisation level here | ||
97 | OPT = -ggdb -O2 | ||
98 | |||
99 | # | ||
100 | # End of user defines | ||
101 | ############################################################################################## | ||
102 | |||
103 | INCDIR = $(patsubst %,-I%,$(DINCDIR) $(UINCDIR)) | ||
104 | LIBDIR = $(patsubst %,-L%,$(DLIBDIR) $(ULIBDIR)) | ||
105 | DEFS = $(DDEFS) $(UDEFS) | ||
106 | ADEFS = $(DADEFS) $(UADEFS) | ||
107 | OBJS = $(ASRC:.s=.o) $(SRC:.c=.o) | ||
108 | LIBS = $(DLIBS) $(ULIBS) | ||
109 | |||
110 | LDFLAGS = -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch $(LIBDIR) | ||
111 | ASFLAGS = -Wa,-amhls=$(<:.s=.lst) $(ADEFS) | ||
112 | CPFLAGS = -Wall -Wextra -Wundef -Wstrict-prototypes -fverbose-asm -Wa,-alms=$(<:.c=.lst) $(DEFS) | ||
113 | |||
114 | # Generate dependency information | ||
115 | CPFLAGS += -MD -MP -MF .dep/$(@F).d | ||
116 | |||
117 | # | ||
118 | # makefile rules | ||
119 | # | ||
120 | |||
121 | all: $(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 | |||
132 | gcov: | ||
133 | -mkdir gcov | ||
134 | $(COV) -u $(subst /,\,$(SRC)) | ||
135 | -mv *.gcov ./gcov | ||
136 | |||
137 | clean: | ||
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 *** | ||