Skip to content

Commit

Permalink
Initial commit for RTLMux.
Browse files Browse the repository at this point in the history
  • Loading branch information
slepp committed Oct 23, 2016
0 parents commit 38def91
Show file tree
Hide file tree
Showing 12 changed files with 2,157 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM alpine

RUN apk --no-cache add libevent

COPY . /app

WORKDIR /app

RUN apk --no-cache add --virtual build-dependencies build-base libevent-dev bsd-compat-headers \
&& make \
&& apk del build-dependencies
41 changes: 41 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
CC=gcc
CFLAGS=-Wall -I/usr/local/include

LIBS=-pthread `pkg-config libevent --libs-only-L` -levent -levent_pthreads

ifeq ($(shell uname -m),armv7l)
CFLAGS+=-O3 -mfpu=neon-vfpv4 -mfloat-abi=hard -march=armv7-a -ffast-math -funsafe-math-optimizations
else
CFLAGS+=-O3
endif

ifneq ($(shell uname),Darwin)
LIBS+=-lrt
endif

ifeq ($(shell uname),Darwin)
CFLAGS+=-glldb
else
CFLAGS+=-ggdb3
endif

SRC=slog.c rtlmux.c config.c cmdline.c main.c
OBJS=slog.o rtlmux.o config.o cmdline.o main.o

all: cmdline.c rtlmux

clean:
rm -f rtlmux $(OBJS)

depend:
makedepend -- $(CFLAGS) -- $(SRC)

cmdline.h: options.ggo
gengetopt -C -i $< -f cmdline.c

cmdline.c: cmdline.h

rtlmux: $(OBJS)
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)

# DO NOT DELETE
Loading

0 comments on commit 38def91

Please sign in to comment.