upstream Makefile doesn't have an install target
[debian/uapevent] / Makefile
1 # File : uapevent/Makefile
2 #
3 # Copyright (C) 2008, Marvell International Ltd.
4 # All Rights Reserved
5  
6 # Path to the top directory of the wlan distribution
7 PATH_TO_TOP = ../..
8
9 # Determine how we should copy things to the install directory
10 ABSPATH := $(filter /%, $(INSTALLDIR))
11 RELPATH := $(filter-out /%, $(INSTALLDIR))
12 INSTALLPATH := $(ABSPATH)
13 ifeq ($(strip $(INSTALLPATH)),)
14 INSTALLPATH := $(PATH_TO_TOP)/$(RELPATH)
15 endif
16
17 # Override CFLAGS for application sources, remove __ kernel namespace defines
18 CFLAGS := $(filter-out -D__%, $(EXTRA_CFLAGS))
19
20
21 #CFLAGS += -DAP22 -fshort-enums
22 CFLAGS += -Wall
23 #ECHO = @
24 LIBS = -lrt
25
26 .PHONY: default tags all
27
28 OBJECTS = uapevent.o
29 HEADERS = uapevent.h
30
31 TARGET = uapevent
32
33 build default: $(TARGET)
34         @cp -f $(TARGET) $(INSTALLPATH)
35
36 all : tags default
37
38 $(TARGET): $(OBJECTS) $(HEADERS)
39         $(ECHO)$(CC) $(LIBS) -o $@ $(OBJECTS)
40
41 %.o: %.c $(HEADERS)
42         $(ECHO)$(CC) $(CFLAGS) -c -o $@ $<
43
44 tags:
45         ctags -R -f tags.txt
46
47 clean:
48         $(ECHO)$(RM) $(OBJECTS) $(TARGET)
49         $(ECHO)$(RM) tags.txt 
50