owlps/libowlps-client/Makefile_atheros_openwrt

62 lines
980 B
Plaintext

include ../common.mk
# General variables
LIB_CIBLE=libowlps-client
# Targets to build
STATIC=$(LIB_CIBLE).a
HEADER=owlps-client.h
# Library components
OBJS=$(LIB_CIBLE).o
# Flags
LIBOWLPS_DIR = ../libowlps
CFLAGS = -O2 -Wall -Wextra -Wstrict-prototypes -O -I$(LIBOWLPS_DIR)
#CFLAGS += -g -O0
CFLAGS += -D DEBUG
DEPFLAGS=-MMD
XCFLAGS=$(CFLAGS) $(DEPFLAGS) $(WARN) $(HEADERS)
PICFLAG=-fPIC
#STRIPFLAGS= -Wl,-s
#LDFLAGS=
LATHEROS = -L$(TOOLCHAIN1)/lib -L$(TOOLCHAIN1)/usr/lib -L$(TOOLCHAIN2)/usr/lib
IATHEROS = -I$(TOOLCHAIN1)/usr/include -I$(TOOLCHAIN2)/usr/include
## Standard targets ##
.PHONY : all static clean purge help
all : static
static : $(STATIC)
%.o : %.c $(HEADER)
$(CC) $(XCFLAGS) $(IATHEROS) -c $<
# Static library compilation
$(STATIC) : $(OBJS)
$(RM) $@
$(AR) cru $@ $^
$(RANLIB) $@
## Cleaning ##
clean :
@$(RM) *~ *.o *.d
purge : clean
@$(RM) $(STATIC)
## Help ##
help :
@make help
# Local Variables: *
# mode: makefile-gmake *
# End: *