realtek-doc/rtk-sdk/dms-1250/rtk/build/Makefile.linux.user.rtcore
Markus Stockhausen 21e259eea2 add D-Link DMS-1250 GPL
it even contains the modern RTL8224 sources

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2025-04-27 13:49:04 -04:00

60 lines
1.2 KiB
Text

#
# Copyright (C) 2009 Realtek Semiconductor Corp.
#
# Makefile for SDK Linux Rtcore User Library
#
TARGET := $(SDK_LIBDIR)/librtcore.a
SDK_TOP_DIR := ../..
SDK_SYS_DIR := ../system
#
# main
#
#Added by ZhaoPan on 2017/12/13. update the directory path
#include $(SDK_TOP_DIR)/sdk/build/Makefile.rtcore
include $(SDK_TOP_DIR)/rtk-sdk/build/Makefile.rtcore
RTCORE_USR_DIR := $(SDK_SYS_DIR)/linux/rtcore/user
RTCORE_USR_OBJ :=
ifeq ($(CONFIG_SDK_DRIVER_NIC_USER_MODE),y)
RTCORE_USR_OBJ += \
$(RTCORE_USR_DIR)/rtcore_drv_usr.o
endif
ALL_OBJ := $(RTCORE_OBJ) $(RTCORE_USR_OBJ)
DEPS := $(ALL_OBJ:.o=.d)
EXTRA_CFLAGS += -Wall -Werror -Wuninitialized -Wstrict-prototypes
EXTRA_CFLAGS += -I$(SDK_INCLUDE) -I$(SYS_INCLUDE) -I$(DRV_INCLUDE) -URTK_UNIVERSAL_BSP
.PHONY: $(TARGET)
$(TARGET): $(ALL_OBJ)
$(AR) rcs $@ $(ALL_OBJ)
$(STRIP) --strip-debug -R .note -R .comment $@
%.o: %.c
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
%.d: %.c
@set -e; rm -f $@; \
$(CC) -MM $(CFLAGS) $(EXTRA_CFLAGS) $< > $@.$$$$; \
sed 's,\($(*F)\)\.o[ :]*,$(@D)/$(*F).o $@ : ,g' < $@.$$$$ > $@
@rm -f $@.*
NODEP := clean install romfs
ifeq (0, $(words $(findstring $(MAKECMDGOALS), $(NODEP))))
-include $(DEPS)
endif
romfs:
clean:
rm -rf $(TARGET) $(ALL_OBJ) $(DEPS)