34 lines
961 B
Makefile
34 lines
961 B
Makefile
LOCAL_PATH = $(shell pwd)
|
|
|
|
LDFLAGS += -Wl,--no-as-needed -lstdc++ -lpthread -ldl -lrt -ludev -L$(STAGING_DIR)/usr/lib
|
|
CFLAGS += -Wall -Wno-unknown-pragmas -Wno-format -Wno-format-security -Wno-error=unused-result \
|
|
-O3 -fexceptions -fnon-call-exceptions -D_GNU_SOURCE -I$(STAGING_DIR)/usr/include
|
|
CFLAGS += -I$(STAGING_DIR)/usr/include/ -I$(STAGING_DIR)/usr/include/libdrm/
|
|
LDFLAGS += -L$(STAGING_DIR)/usr/lib -ldrm
|
|
|
|
drm_setcrtc_SRCS = \
|
|
$(LOCAL_PATH)/drm_setcrtc.c \
|
|
$(NULL)
|
|
|
|
OUT_DIR ?= .
|
|
# ---------------------------------------------------------------------
|
|
# Build rules
|
|
BUILD_TARGETS = drm_setcrtc
|
|
|
|
.PHONY: all install uninstall clean
|
|
|
|
drm_setcrtc: $(drm_setcrtc_SRCS)
|
|
$(CC) $(CFLAGS) -L$(LOCAL_PATH) $(LDFLAGS) -o $(OUT_DIR)/$@ $^ $(LDLIBS)
|
|
|
|
all: $(BUILD_TARGETS)
|
|
|
|
clean:
|
|
rm -f *.o $(OUT_DIR)/$(BUILD_TARGETS)
|
|
|
|
install:
|
|
install -m 755 $(OUT_DIR)/drm_setcrtc $(TARGET_DIR)/usr/bin/
|
|
|
|
uninstall:
|
|
rm -f $(TARGET_DIR)/usr/bin/drm_setcrtc
|
|
|