rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | TARGET := thermal_manager
|
| 2 | SOURCES := thermal_manager.c
|
| 3 | OBJ_PATH = thermal_manager.o
|
| 4 | #OBJECTS := $(SOURCES:.c=.o)
|
| 5 | OBJ = thermal_manager.o
|
| 6 | LDFLAGS += -lmtcloader
|
| 7 |
|
| 8 | CFLAGS += -O3 -D__EXTERN_C_LIB__ -ldl
|
| 9 | GET_LOCAL_DIR = $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
|
| 10 |
|
| 11 | .PHONY: all clean install
|
| 12 |
|
| 13 | all: $(TARGET)
|
| 14 |
|
| 15 | ${TARGET}:${OBJ_PATH}
|
| 16 | ${CC} ${OBJ} ${CFLAGS} -o $@
|
| 17 |
|
| 18 | #$(TARGET): $(OBJECTS)
|
| 19 | # $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
|
| 20 |
|
| 21 | clean:
|
| 22 | $(RM) $(OBJECTS) $(TARGET)
|
| 23 |
|
| 24 | MTKTHERMAL_DIR_INSTALL = "/usr/bin/"
|
| 25 |
|
| 26 | install: $(TARGET)
|
| 27 | echo $(DESTDIR)
|
| 28 | echo $(PREFIX)
|
| 29 | echo $(shell pwd)
|
| 30 | install -d $(DESTDIR)$(PREFIX)/bin/
|
| 31 | install -d $(DESTDIR)$(PREFIX)/lib/
|
| 32 | install -d ${DESTDIR}${PREFIX}/lib/pkgconfig/
|
| 33 | install -m 755 $(TARGET) $(DESTDIR)$(PREFIX)/bin/
|