lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | ################################################################################ |
| 2 | # yes = ¿ªÔ´ |
| 3 | # no = ±ÕÔ´ |
| 4 | ################################################################################ |
| 5 | LIB_GMAC = yes |
| 6 | LIB_GPIO = yes |
| 7 | LIB_I2C = yes |
| 8 | LIB_MISC = yes |
| 9 | LIB_MMC = yes |
| 10 | LIB_MTD = yes |
| 11 | LIB_NAND = yes |
| 12 | LIB_PARTITION = yes |
| 13 | LIB_POWER = yes |
| 14 | LIB_SERIAL = yes |
| 15 | LIB_SPI = yes |
| 16 | LIB_USB_DWC = yes |
| 17 | LIB_SDIO = yes |
| 18 | LIB_LED = yes |
| 19 | LIB_LCD = yes |
| 20 | LIB_PERIPHERAL = yes |
| 21 | LIB_CHARGER = yes |
| 22 | LIB_HASH = yes |
| 23 | LIB_RSA = yes |
| 24 | LIB_DMA = yes |
| 25 | LIB_EFUSE = yes |
| 26 | LIB_WDT = yes |
| 27 | |
| 28 | ################################################################################ |
| 29 | #¸ø¶¥²ãMakefileʹÓõÄÇý¶¯.o¿âÎļþ£¬Õⲿ·Ö¿ªÔ´ |
| 30 | ################################################################################ |
| 31 | DRIVEROBJS := |
| 32 | |
| 33 | ################################################################################ |
| 34 | #¸øÍ¬¼¶Ä¿Â¼MakefileʹÓõÄÇý¶¯.o¿âÎļþ£¬Õⲿ·Ö±ÕÔ´ |
| 35 | ################################################################################ |
| 36 | DRIVERLIBS := |
| 37 | |
| 38 | ################################################################################ |
| 39 | #¸øÍ¬¼¶Ä¿Â¼MakefileʹÓÃɾ³ý±ÕÔ´´úÂë |
| 40 | ################################################################################ |
| 41 | DRIVERSRC := |
| 42 | |
| 43 | ################################################################################ |
| 44 | ################################################################################ |
| 45 | ifeq ($(LIB_GMAC),yes) |
| 46 | DRIVEROBJS += drivers/gmac/libgmac.o |
| 47 | else |
| 48 | DRIVERLIBS += gmac/libgmac.o |
| 49 | DRIVERSRC += gmac/*.c |
| 50 | endif |
| 51 | |
| 52 | ifeq ($(LIB_GPIO),yes) |
| 53 | DRIVEROBJS += drivers/gpio/libgpio.o |
| 54 | else |
| 55 | DRIVERLIBS += gpio/libgpio.o |
| 56 | DRIVERSRC += gpio/*.c |
| 57 | endif |
| 58 | |
| 59 | ifeq ($(LIB_I2C),yes) |
| 60 | DRIVEROBJS += drivers/i2c/libi2c.o |
| 61 | else |
| 62 | DRIVERLIBS += i2c/libi2c.o |
| 63 | DRIVERSRC += i2c/*.c |
| 64 | endif |
| 65 | |
| 66 | ifeq ($(LIB_MISC),yes) |
| 67 | DRIVEROBJS += drivers/misc/libmisc.o |
| 68 | else |
| 69 | DRIVERLIBS += misc/libmisc.o |
| 70 | DRIVERSRC += misc/*.c |
| 71 | endif |
| 72 | |
| 73 | ifeq ($(LIB_MMC),yes) |
| 74 | DRIVEROBJS += drivers/mmc/libmmc.o |
| 75 | else |
| 76 | DRIVERLIBS += mmc/libmmc.o |
| 77 | DRIVERSRC += mmc/*.c |
| 78 | endif |
| 79 | |
| 80 | ifeq ($(LIB_MTD),yes) |
| 81 | DRIVEROBJS += drivers/mtd/libmtd.o |
| 82 | else |
| 83 | DRIVERLIBS += mtd/libmtd.o |
| 84 | DRIVERSRC += mtd/*.c |
| 85 | endif |
| 86 | |
| 87 | ifeq ($(LIB_NAND),yes) |
| 88 | DRIVEROBJS += drivers/mtd/nand/libnand.o |
| 89 | else |
| 90 | DRIVERLIBS += mtd/nand/libnand.o |
| 91 | DRIVERSRC += mtd/nand/*.c |
| 92 | endif |
| 93 | |
| 94 | ifeq ($(LIB_PARTITION),yes) |
| 95 | DRIVEROBJS += drivers/mtd/partition/libpartition.o |
| 96 | else |
| 97 | DRIVERLIBS += mtd/partition/libpartition.o |
| 98 | DRIVERSRC += mtd/partition/*.c |
| 99 | endif |
| 100 | |
| 101 | ifeq ($(LIB_POWER),yes) |
| 102 | DRIVEROBJS += drivers/power/libpower.o |
| 103 | else |
| 104 | DRIVERLIBS += power/libpower.o |
| 105 | DRIVERSRC += power/*.c |
| 106 | endif |
| 107 | |
| 108 | ifeq ($(LIB_SERIAL),yes) |
| 109 | DRIVEROBJS += drivers/serial/libserial.o |
| 110 | else |
| 111 | DRIVERLIBS += serial/libserial.o |
| 112 | DRIVERSRC += serial/*.c |
| 113 | endif |
| 114 | |
| 115 | ifeq ($(LIB_SPI),yes) |
| 116 | DRIVEROBJS += drivers/spi/libspi.o |
| 117 | else |
| 118 | DRIVERLIBS += spi/libspi.o |
| 119 | DRIVERSRC += spi/*.c |
| 120 | endif |
| 121 | |
| 122 | ifeq ($(LIB_USB_DWC),yes) |
| 123 | DRIVEROBJS += drivers/usb_drv/libusb_dwc.o |
| 124 | else |
| 125 | DRIVERLIBS += usb_drv/libusb_dwc.o |
| 126 | DRIVERSRC += usb_drv/*.c |
| 127 | endif |
| 128 | |
| 129 | ifeq ($(LIB_SDIO),yes) |
| 130 | DRIVEROBJS += drivers/sdio/libsdio.o |
| 131 | else |
| 132 | DRIVERLIBS += sdio/libsdio.o |
| 133 | DRIVERSRC += sdio/*.c |
| 134 | endif |
| 135 | |
| 136 | ifeq ($(LIB_LED),yes) |
| 137 | DRIVEROBJS += drivers/led/libled.o |
| 138 | else |
| 139 | DRIVERLIBS += led/libled.o |
| 140 | DRIVERSRC += led/*.c |
| 141 | endif |
| 142 | |
| 143 | ifeq ($(LIB_LCD),yes) |
| 144 | DRIVEROBJS += drivers/lcd/liblcd.o |
| 145 | else |
| 146 | DRIVERLIBS += lcd/liblcd.o |
| 147 | DRIVERSRC += lcd/*.c |
| 148 | endif |
| 149 | |
| 150 | ifeq ($(LIB_PERIPHERAL),yes) |
| 151 | DRIVEROBJS += drivers/peripheral/libperipheral.o |
| 152 | else |
| 153 | DRIVERLIBS += peripheral/libperipheral.o |
| 154 | DRIVERSRC += peripheral/*.c |
| 155 | endif |
| 156 | |
| 157 | ifeq ($(LIB_CHARGER),yes) |
| 158 | DRIVEROBJS += drivers/charger/libcharger.o |
| 159 | else |
| 160 | DRIVERLIBS += charger/libcharger.o |
| 161 | DRIVERSRC += charger/*.c |
| 162 | endif |
| 163 | |
| 164 | ifeq ($(LIB_HASH),yes) |
| 165 | DRIVEROBJS += drivers/hash/libdrv_hash.o |
| 166 | else |
| 167 | DRIVERLIBS += hash/libdrv_hash.o |
| 168 | DRIVERSRC += hash/*.c |
| 169 | endif |
| 170 | |
| 171 | ifeq ($(LIB_RSA),yes) |
| 172 | DRIVEROBJS += drivers/rsa/libdrv_rsa.o |
| 173 | else |
| 174 | DRIVERLIBS += rsa/libdrv_rsa.o |
| 175 | DRIVERSRC += rsa/*.c |
| 176 | endif |
| 177 | |
| 178 | ifeq ($(LIB_DMA),yes) |
| 179 | DRIVEROBJS += drivers/dma/libdma.o |
| 180 | else |
| 181 | DRIVERLIBS += dma/libdma.o |
| 182 | DRIVERSRC += dma/*.c |
| 183 | endif |
| 184 | |
| 185 | ifeq ($(LIB_EFUSE),yes) |
| 186 | DRIVEROBJS += drivers/efuse/libefuse.o |
| 187 | else |
| 188 | DRIVERLIBS += efuse/libefuse.o |
| 189 | DRIVERSRC += efuse/*.c |
| 190 | endif |
| 191 | |
| 192 | ifeq ($(LIB_WDT),yes) |
| 193 | DRIVEROBJS += drivers/wdt/libwdt.o |
| 194 | else |
| 195 | DRIVERLIBS += wdt/libwdt.o |
| 196 | DRIVERSRC += wdt/*.c |
| 197 | endif |