mwifiex/mwifiex_8997/mapp/wifidirectutl/Makefile

57 lines
1.2 KiB
Makefile
Raw Normal View History

# File : wifidirectutl/Makefile
#
# Copyright (C) 2008-2019, Marvell International Ltd. All Rights Reserved
# Path to the top directory of the wlan distribution
PATH_TO_TOP = ../..
# Determine how we should copy things to the install directory
ABSPATH := $(filter /%, $(INSTALLDIR))
RELPATH := $(filter-out /%, $(INSTALLDIR))
INSTALLPATH := $(ABSPATH)
ifeq ($(strip $(INSTALLPATH)),)
INSTALLPATH := $(PATH_TO_TOP)/$(RELPATH)
endif
# Override CFLAGS for application sources, remove __ kernel namespace defines
CFLAGS := $(filter-out -D__%, $(ccflags-y))
# remove KERNEL include dir
CFLAGS := $(filter-out -I$(KERNELDIR)%, $(CFLAGS))
CFLAGS += -Wall
LIBS = -lrt
.PHONY: default tags all
OBJECTS = wifidirectutl.o
HEADERS = wifidirectutl.h
ifneq (,$(findstring DWIFI_DISPLAY_SUPPORT, $(CFLAGS)))
OBJECTS += wifi_display.o
HEADERS += wifi_display.h
endif
TARGET = wifidirectutl
build default: $(TARGET)
@cp -f $(TARGET) $(INSTALLPATH)
@cp -rf config $(INSTALLPATH)
all : tags default
$(TARGET): $(OBJECTS) $(HEADERS)
$(ECHO)$(CC) $(LIBS) -o $@ $(OBJECTS)
%.o: %.c $(HEADERS)
$(ECHO)$(CC) $(CFLAGS) -c -o $@ $<
tags:
ctags -R -f tags.txt
distclean clean:
$(ECHO)$(RM) $(OBJECTS) $(TARGET)
$(ECHO)$(RM) tags.txt