13 Commits
0.0.1 ... 0.0.4

Author SHA1 Message Date
59da44cbed Merge pull request #10 from colindean/matrix
Uses a build matrix to get binaries for Linux and macOS
2018-04-08 13:43:14 -04:00
ca2ae12337 Fixes YAML for travis
Apparently, one element confuses Travis
2018-04-08 13:39:28 -04:00
1d0b87c6c5 Uses a build matrix to get binaries for Linux and macOS 2018-04-08 13:36:54 -04:00
2a6de7550f Adds OS and architecture to archive name 2018-04-08 13:32:07 -04:00
b3270e4537 Executes libpng-config once
Instead of at each CC invocation
2018-04-08 13:21:25 -04:00
3956bd04a6 Skips cleanup
I cannot for the life of me figure out why this is the default other
than to save Travis space when people have huge artifacts.
2018-04-08 13:18:44 -04:00
7b80324f76 Merge pull request #9 from colindean/cleanup
Moves some vars in the Makefile
2018-04-08 12:48:45 -04:00
e7b7d26bfa Adds travis deployment 2018-04-08 12:43:25 -04:00
a3266f26ea Builds an archive 2018-04-08 12:40:49 -04:00
4bbe161c8a Ignore some things
These were getting annoying
2018-04-08 12:33:45 -04:00
1bed801fe7 Removes redundant libpng include
It's gotten from the libpng-config command
2018-04-08 12:30:28 -04:00
a36cf13e52 Moves some vars in the Makefile 2018-04-08 12:27:39 -04:00
94badc9693 Merge pull request #8 from colindean/silence-warnings
Silences a few build warnings
2018-04-08 12:07:32 -04:00
3 changed files with 45 additions and 7 deletions

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
*.o
golay
golay_codes.c
optar
unoptar

View File

@ -1,5 +1,21 @@
language: c
compiler:
- clang
- gcc
script: "make"
matrix:
include:
- os: linux
compiler: gcc
- os: osx
compiler: clang
script: make -j
before_deploy: make -j archive
deploy:
provider: releases
api_key:
secure: mz4/p8VB7qn6F3M8uPT2/mJmU/nEWRGgsxN+KM/Gg1isSVrRpWP0xYfPTOdU6o9f0IVBRIW7SjHuq1H9kqGhmWx+Aycs8gE905ORYidLRjbkPN/fiS2jL6CcRzolkprvK7btIRhxfFGB/y3L0MELh+kXo1A6oIm+2a+OwNpdi4c=
file: optar-*.tar.gz
file_glob: true
skip_cleanup: true
on:
repo: colindean/optar
tags: true

View File

@ -5,10 +5,22 @@ ifeq ($(CC), gcc)
else
SPECIFIC_CFLAGS=
endif
INCLUDE_PATHS=$(shell libpng-config --I_opts)
CFLAGS=-O3 -Wall -Wuninitialized \
-fomit-frame-pointer -funroll-loops \
$(SPECIFIC_CFLAGS) \
-DNODEBUG `libpng-config --I_opts`
-DNODEBUG $(INCLUDE_PATHS)
VERSION=$(shell git describe)
ifdef TRAVIS_OS_NAME
OS=$(TRAVIS_OS_NAME)
else
OS=$(shell uname -s)
endif
ARCH=$(shell uname -m)
ARCHIVE_PATH=optar-$(VERSION)-$(OS)-$(ARCH).tar.gz
BINARIES=optar unoptar
EXECUTABLES=$(BINARIES) pgm2ps
all: optar unoptar
@ -23,7 +35,7 @@ uninstall:
rm /usr/local/bin/pgm2ps
clean:
rm -f optar unoptar golay golay_codes.c *.o
rm -f $(BINARIES) optar-*.tar.gz golay_codes.c *.o
common.o: common.c optar.h
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
@ -41,7 +53,7 @@ golay.o: golay.c parity.h
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
unoptar.o: unoptar.c optar.h parity.h
$(CC) -c -I/usr/local/include/libpng $(CPPFLAGS) $(CFLAGS) -o $@ $<
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
optar: optar.o common.o golay_codes.o parity.o
$(CC) $(LDFLAGS) -o $@ $^
@ -54,3 +66,8 @@ golay: golay.o parity.o
unoptar: unoptar.o common.o golay_codes.o parity.o
$(CC) -o $@ -L/usr/local/lib $^ -lm -lpng -lz
archive: $(ARCHIVE_PATH)
$(ARCHIVE_PATH): $(EXECUTABLES)
tar czvf $@ $^