1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-10 18:24:11 +01:00
LibrePilot/flight/libraries/rscode/Makefile
James Duley e308039206 LP-99 Decouple flight build
Moved flight make code into flight/Makefile. This should speed up
rebuilds for GCS and keeps the top level Makefile tidier.

Change-Id: I9d33cb5c223b6a8ed2821435a5d63ecf4b97c6b8
2015-09-02 19:34:58 +12:00

51 lines
948 B
Makefile

# Makefile for Cross Interleaved Reed Solomon encoder/decoder
#
# (c) Henry Minsky, Universal Access 1991-1996
#
RANLIB = ranlib
AR = ar
VERSION = 1.0
DIRNAME= rscode-$(VERSION)
CC = gcc
# OPTIMIZE_FLAGS = -O69
DEBUG_FLAGS = -g
CFLAGS = -Wall -Wstrict-prototypes $(OPTIMIZE_FLAGS) $(DEBUG_FLAGS) -I..
LDFLAGS = $(OPTIMIZE_FLAGS) $(DEBUG_FLAGS)
LIB_CSRC = rs.c galois.c berlekamp.c crcgen.c
LIB_HSRC = ecc.h
LIB_OBJS = rs.o galois.o berlekamp.o crcgen.o
TARGET_LIB = libecc.a
TEST_PROGS = example
TARGETS = $(TARGET_LIB) $(TEST_PROGS)
all: $(TARGETS)
$(TARGET_LIB): $(LIB_OBJS)
rm $@
$(AR) cq $@ $(LIB_OBJS)
if [ "$(RANLIB)" ]; then $(RANLIB) $@; fi
example: example.o galois.o berlekamp.o crcgen.o rs.o
gcc -o example example.o -L. -lecc
clean:
rm -f *.o example libecc.a
rm -f *~
dist:
(cd ..; tar -cvf rscode-$(VERSION).tar $(DIRNAME))
depend:
makedepend $(SRCS)
# DO NOT DELETE THIS LINE -- make depend depends on it.