realtek-doc/sources/rtk-xgs1210/build/Makefile.linux.user.rtk
Markus Stockhausen 18a30ac6d1 add XGS1210 sdk
2025-04-27 15:53:52 -04:00

51 lines
915 B
Text

#
# Copyright (C) 2009 Realtek Semiconductor Corp.
#
# Makefile for SDK Linux Rtk User Library
#
SDK_TOP_DIR := ../..
#
# main
#
include $(SDK_TOP_DIR)/sdk/build/Makefile.rtk
include $(SDK_TOP_DIR)/sdk/build/Makefile.phy
#
# for lib
#
ALL_OBJ := $(RTK_ALL_OBJ) $(PHY_OBJ) $(CUST_PHY)
DEPS := $(ALL_OBJ:.o=.d)
TARGET := $(SDK_LIBDIR)/librtk.a
.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 $@.*
#Don't create dependencies when we're cleaning, installing, ...
NODEP := clean install romfs
ifeq (0, $(words $(findstring $(MAKECMDGOALS), $(NODEP))))
-include $(DEPS)
endif
romfs:
clean:
rm -rf $(TARGET) $(ALL_OBJ) $(DEPS)