2020-04-19 16:54:27 +00:00
|
|
|
# File : mlanutl/Makefile
|
|
|
|
#
|
2021-02-24 06:17:59 +00:00
|
|
|
# Copyright 2011-2020 NXP
|
2020-04-19 16:54:27 +00:00
|
|
|
|
|
|
|
# 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 += -DAP22 -fshort-enums
|
|
|
|
CFLAGS += -Wall
|
|
|
|
#ECHO = @
|
2021-07-18 09:43:16 +00:00
|
|
|
ifeq (,$(findstring ANDROID_KERNEL, $(CFLAGS)))
|
|
|
|
LIBS=-lrt
|
|
|
|
endif
|
2020-04-19 16:54:27 +00:00
|
|
|
|
|
|
|
.PHONY: default tags all
|
|
|
|
|
|
|
|
OBJECTS = mlanutl.o
|
|
|
|
HEADERS = mlanutl.h
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
exectarget=mlanutl
|
|
|
|
TARGET := $(exectarget)
|
|
|
|
|
|
|
|
build default: $(TARGET)
|
|
|
|
@cp -f $(TARGET) $(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
|
|
|
|
|