-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsubdir.mk
52 lines (47 loc) · 1.21 KB
/
subdir.mk
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
# Add inputs and outputs from these tool invocations to the build variables
C_SRCS += \
$(DIR_SRC)/config.c \
$(DIR_SRC)/data.c \
$(DIR_SRC)/export.c \
$(DIR_SRC)/fwatch.c \
$(DIR_SRC)/import.c \
$(DIR_SRC)/log.c \
$(DIR_SRC)/nvipfix.c \
$(DIR_SRC)/types.c \
$(DIR_SRC)/main.c \
$(DIR_SRC)/_test.c \
$(DIR_SRC)/logcfg.S
OBJS += \
$(DIR_OBJ)/config.o \
$(DIR_OBJ)/data.o \
$(DIR_OBJ)/export.o \
$(DIR_OBJ)/fwatch.o \
$(DIR_OBJ)/import.o \
$(DIR_OBJ)/log.o \
$(DIR_OBJ)/nvipfix.o \
$(DIR_OBJ)/types.o \
$(DIR_OBJ)/main.o \
$(DIR_OBJ)/_test.o \
$(DIR_OBJ)/logcfg.o
C_DEPS += \
$(DIR_DEP)/config.d \
$(DIR_DEP)/data.d \
$(DIR_DEP)/export.d \
$(DIR_DEP)/fwatch.d \
$(DIR_DEP)/import.d \
$(DIR_DEP)/log.d \
$(DIR_DEP)/nvipfix.d \
$(DIR_DEP)/types.d \
$(DIR_DEP)/main.d \
$(DIR_DEP)/_test.d
# Each subdirectory must supply rules for building sources it contributes
$(DIR_OBJ)/%.o: $(DIR_SRC)/%.c
@echo 'Building file: $<'
@echo 'Invoking: Cross GCC Compiler'
$(CC) `pkg-config --cflags glib-2.0` $(CFLAGS) -O0 -g3 -Wall -c -fmessage-length=0 -fopenmp -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '
$(DIR_OBJ)/%.o: $(DIR_SRC)/%.S
@echo 'Building file: $<'
$(CC) -c -o "$@" "$<"
@echo ' '