Skip to content

Commit

Permalink
Added makefiles to encode and decode, and new binary builds for encod…
Browse files Browse the repository at this point in the history
…e (x64 & arm) and decode
  • Loading branch information
szabolor committed Aug 28, 2015
1 parent c47e27f commit c9ae4ae
Show file tree
Hide file tree
Showing 12 changed files with 71 additions and 3 deletions.
30 changes: 30 additions & 0 deletions smog_ref/v0.2/decode/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
CC = gcc
CFLAGS = -Wall -Wextra
LDFLAGS = -L. -ldecref
RM = rm
AR = ar

.PHONY: all
all: libdecref dec_usage

dec_usage: libdecref dec_usage.c
$(CC) dec_usage.c $(LDFLAGS) -o dec_usage

libdecref: dec_ref.o rs/decode_rs.o viterbi/spiral-vit_v16-single.o
$(AR) rcs libdecref.a dec_ref.o rs/decode_rs.o viterbi/spiral-vit_v16-single.o

dec_ref.o: dec_ref.c
$(CC) $(CFLAGS) -c -fPIC dec_ref.c -o dec_ref.o

rs/decode_rs.o: rs/decode_rs.c
$(CC) $(CFLAGS) -c -fPIC rs/decode_rs.c -o rs/decode_rs.o

viterbi/spiral-vit_v16-single.o: viterbi/spiral-vit_v16-single.c
$(CC) $(CFLAGS) -c -fPIC viterbi/spiral-vit_v16-single.c -o viterbi/spiral-vit_v16-single.o

clean: clean-debug
-$(RM) libdecref.a dec_ref.o rs/decode_rs.o viterbi/spiral-vit_v16-single.o
-$(RM) dec_usage

clean-debug:
-$(RM) debug_*
Binary file added smog_ref/v0.2/decode/libdecref.a
Binary file not shown.
39 changes: 39 additions & 0 deletions smog_ref/v0.2/encode/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
CC = gcc
ARM = arm-none-eabi-

CFLAGS = -Wall -Wextra
CFLAGS_ARM_EXTRA = -Os -mcpu=cortex-m3 -mthumb --specs=nosys.specs

LDFLAGS = -L. -lencref

RM = rm
AR = ar


all: libencref enc_usage

arm: libencref_arm

libencref_arm: enc_ref_arm.o
$(ARM)$(AR) rcs libencref_arm.a enc_ref_arm.o

enc_ref_arm.o: enc_ref.c
$(ARM)$(CC) $(CFLAGS) $(CFLAGS_ARM_EXTRA) -c -fPIC enc_ref.c -o enc_ref_arm.o

enc_usage: libencref enc_usage.c
$(CC) enc_usage.c $(LDFLAGS) -o enc_usage

libencref: enc_ref.o
$(AR) rcs libencref.a enc_ref.o

enc_ref.o: enc_ref.c
$(CC) $(CFLAGS) -c -fPIC enc_ref.c -o enc_ref.o

clean: clean-test clean-arm
-$(RM) libencref.a enc_ref.o enc_usage

clean-test:
-$(RM) test_*

clean-arm:
-$(RM) libencref_arm.a enc_ref_arm.o
4 changes: 2 additions & 2 deletions smog_ref/v0.2/encode/enc_ref.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#include <stdint.h>

#define LOW_MEMORY 0 // low memory workaround to avoid LUT (and preserve 512byte)
#define ENABLE_BIT_OUTPUT 1 // enable
#define LOW_MEMORY 1 // low memory workaround to avoid LUT (and preserve 512byte)
#define ENABLE_BIT_OUTPUT 0 // enable

void encode_data(uint8_t (*data)[256], uint8_t (*encoded)[650]);

Expand Down
Binary file modified smog_ref/v0.2/encode/enc_usage
Binary file not shown.
Binary file removed smog_ref/v0.2/encode/enc_usage_arm
Binary file not shown.
Binary file added smog_ref/v0.2/encode/libencref.a
Binary file not shown.
Binary file added smog_ref/v0.2/encode/libencref_arm.a
Binary file not shown.
Binary file removed smog_ref/v0.2/encode/libencrefarm.so
Binary file not shown.
Binary file removed smog_ref/v0.2/encode/libencrefarm_m4.so
Binary file not shown.
Binary file removed smog_ref/v0.2/encode/test_enc
Binary file not shown.
1 change: 0 additions & 1 deletion smog_ref/v0.2/encode/test_fec

This file was deleted.

0 comments on commit c9ae4ae

Please sign in to comment.