blob: 0756c79599262c5e4b977ebac2991182d6e3f4de [file] [log] [blame]
developer55ac2c32024-05-06 14:31:19 +08001# SPDX-License-Identifier: GPL-2.0-or-later */
2#
3
4# Include directories
5INCLUDES := -Iexample/cli/cmds \
6 -Iexample/cli/ \
7 -Iexample/fapi \
8 -Iexample/os \
9 -Iexample \
10 -Iswitch_hostapi/include/gpy \
11 -Iswitch_hostapi/include/gswip \
12 -Iswitch_hostapi/src \
13 -Iswitch_ioctl/src
14
15# Source files
16SRCS := $(wildcard example/cli/cmds/*.c) \
17 $(wildcard example/cli/*.c) \
18 $(wildcard example/fapi/*.c) \
19 $(wildcard switch_ioctl/src/*.c) \
20 switch_hostapi/src/gsw_api.c \
21 switch_hostapi/src/gsw_cli_common.c \
22 switch_hostapi/src/host_adapt.c \
23 switch_hostapi/src/host_api_impl.c \
24 switch_hostapi/src/host_smdio_ssb.c \
25 switch_hostapi/src/mdio_relay.c \
26 switch_hostapi/src/sys_misc.c
27
28# Define the C object files
29OBJS := $(SRCS:.c=.o)
30
31# Define the name of the executable file
32TARGET := ethswbox
33
34.PHONY: clean
35
36all: $(TARGET)
37
38$(TARGET): $(OBJS)
39 $(CC) $(LDFLAGS) -o $@ $^
40
41%.o: %.c
42 $(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
43
44clean:
45 rm -f $(OBJS) $(TARGET)