-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile.win32
106 lines (84 loc) · 1.96 KB
/
Makefile.win32
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#
# Copyright (c) Riverdi Sp. z o.o. sp. k. <[email protected]>
# Copyright (c) Skalski Embedded Technologies <[email protected]>
#
# Project name
PROJECT = riverdi-demo
# List all C defines here
DEFS = -DFT232H_MINGW_PLATFORM
DEFS += -DBUFFER_OPTIMIZATION
#DEFS += -DEVE_1
#DEFS += -DEVE_2
#DEFS += -DEVE_3
DEFS += -DEVE_4
#DEFS += -DEVE_4_INTERNAL_OSC
DEFS += -DEVE_4_EXTERNAL_OSC
#DEFS += -DNTP_35
#DEFS += -DRTP_35
#DEFS += -DCTP_35
#DEFS += -DNTP_43
#DEFS += -DRTP_43
#DEFS += -DCTP_43
#DEFS += -DNTP_50
#DEFS += -DRTP_50
#DEFS += -DCTP_50
#DEFS += -DNTP_70
#DEFS += -DRTP_70
#DEFS += -DCTP_70
#DEFS += -DIPS_35
#DEFS += -DIPS_43
#DEFS += -DIPS_50
#DEFS += -DIPS_70
DEFS += -DIPS_101
# Define optimisation level here
OPT =
# Tools
PREFIX =
CC = $(PREFIX)gcc
CXX = $(PREFIX)g++
GDB = $(PREFIX)gdb
CP = $(PREFIX)objcopy
AS = $(PREFIX)gcc -x assembler-with-cpp
# List of source files
SRC = ./$(PROJECT).c
SRC += ./host_layer/ft232h_mingw/platform.c
SRC += ./eve_layer/Gpu_Hal.c
SRC += ./eve_layer/CoPro_Cmds.c
SRC += ./eve_layer/Hal_Utils.c
SRC += ./app_layer/App_Common.c
# List all include directories here
INCDIRS = ./
INCDIRS += ./host_layer/ft232h_mingw
INCDIRS += ./host_layer/ft232h_mingw/lib
INCDIRS += ./eve_layer
INCDIRS += ./app_layer
INCDIRS += ./riverdi_modules
# List the user directory to look for the libraries here
LIBDIRS += ./host_layer/ft232h_mingw/lib
# List all user libraries here
LIBS = MPSSE
# Dirs
OBJS = $(SRC:.c=.o)
INCDIR = $(patsubst %,-I%, $(INCDIRS))
LIBDIR = $(patsubst %,-L%, $(LIBDIRS))
LIB = $(patsubst %,-l%, $(LIBS))
# Flags
COMMONFLAGS =
ASFLAGS = $(COMMONFLAGS)
CPFLAGS = $(COMMONFLAGS) $(DEFS)
LDFLAGS = $(COMMONFLAGS) $(LIBDIR) $(LIB)
#
# Makefile Rules
#
all: $(PROJECT)
$(PROJECT): $(OBJS)
$(CC) $(OBJS) $(LDFLAGS) -o $@
%.o: %.c
$(CC) -c $(CPFLAGS) -I . $(INCDIR) $< -o $@
%.o: %.s
$(AS) -c $(ASFLAGS) $< -o $@
clean:
-rm -rf $(PROJECT)
-rm -rf $(OBJS)
-rm -rf $(SRC:.c=.lst)
-rm -rf $(ASRC:.s=.lst)