blob: 720869634ffb6edd912f1b19809ae2231f3380bf [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001TARGET := thermal_manager
2SOURCES := thermal_manager.c
3OBJ_PATH = thermal_manager.o
4#OBJECTS := $(SOURCES:.c=.o)
5OBJ = thermal_manager.o
6LDFLAGS += -lmtcloader
7
8CFLAGS += -O3 -D__EXTERN_C_LIB__ -ldl
9GET_LOCAL_DIR = $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
10
11.PHONY: all clean install
12
13all: $(TARGET)
14
15${TARGET}:${OBJ_PATH}
16 ${CC} ${OBJ} ${CFLAGS} -o $@
17
18#$(TARGET): $(OBJECTS)
19# $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
20
21clean:
22 $(RM) $(OBJECTS) $(TARGET)
23
24MTKTHERMAL_DIR_INSTALL = "/usr/bin/"
25
26install: $(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/