File: Makefile

package info (click to toggle)
uaputl 1.12-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 468 kB
  • ctags: 710
  • sloc: ansic: 8,633; makefile: 33
file content (52 lines) | stat: -rwxr-xr-x 1,073 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File : uaputl/Makefile
#
# Copyright (C) 2008, 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__%, $(EXTRA_CFLAGS))


#CFLAGS += -DAP22 -fshort-enums
CFLAGS += -Wall -std=gnu89
#ECHO = @
LIBS = -lrt

.PHONY: default tags all

OBJECTS = uaputl.o uapcmd.o
HEADERS = uaputl.h uapcmd.h

TARGET = uaputl

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

clean:
	$(ECHO)$(RM) $(OBJECTS) $(TARGET)
	$(ECHO)$(RM) tags.txt