blob: 720869634ffb6edd912f1b19809ae2231f3380bf [file] [log] [blame]
TARGET := thermal_manager
SOURCES := thermal_manager.c
OBJ_PATH = thermal_manager.o
#OBJECTS := $(SOURCES:.c=.o)
OBJ = thermal_manager.o
LDFLAGS += -lmtcloader
CFLAGS += -O3 -D__EXTERN_C_LIB__ -ldl
GET_LOCAL_DIR = $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
.PHONY: all clean install
all: $(TARGET)
${TARGET}:${OBJ_PATH}
${CC} ${OBJ} ${CFLAGS} -o $@
#$(TARGET): $(OBJECTS)
# $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
clean:
$(RM) $(OBJECTS) $(TARGET)
MTKTHERMAL_DIR_INSTALL = "/usr/bin/"
install: $(TARGET)
echo $(DESTDIR)
echo $(PREFIX)
echo $(shell pwd)
install -d $(DESTDIR)$(PREFIX)/bin/
install -d $(DESTDIR)$(PREFIX)/lib/
install -d ${DESTDIR}${PREFIX}/lib/pkgconfig/
install -m 755 $(TARGET) $(DESTDIR)$(PREFIX)/bin/