23 lines
491 B
Makefile
23 lines
491 B
Makefile
CROSS_COMPILE ?=
|
|
CC := $(CROSS_COMPILE)gcc
|
|
CFLAGS += -Wall -Os -g -I../libini -fno-builtin
|
|
# 只链接静态库,不使用系统动态库
|
|
LDFLAGS += -static -L../libini
|
|
LIBS += ../libini/libini.a
|
|
BIN = boot
|
|
|
|
all: libini $(BIN)
|
|
|
|
libini:
|
|
$(MAKE) -C ../libini CC=$(CC)
|
|
|
|
reboot_temperature.o: reboot_temperature.c reboot_temperature.h
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
|
|
|
$(BIN): reboot_temperature.o
|
|
$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) $(LIBS)
|
|
|
|
clean:
|
|
rm -f *.o $(BIN)
|
|
$(MAKE) -C ../libini clean
|