You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
717 B
30 lines
717 B
CROSS_COMPILE ?= aarch64-none-linux-gnu-
|
|
|
|
CC := $(CROSS_COMPILE)gcc
|
|
LD := $(CROSS_COMPILE)gcc
|
|
VER :=1.1
|
|
PTMPDIR :=serialmux-$(VER)
|
|
|
|
CFLAGS := -D_GNU_SOURCE -std=gnu99 -Wall -fno-strict-aliasing -O2
|
|
CFLAGS += -Ilibev -DNDEBUG -Iduktape
|
|
|
|
LDFLAGS += -static -lutil -lm -Llibs -lev -Wl,-s
|
|
|
|
OBJS := src/main.o src/dictionary.o src/iniparser.o
|
|
#OBJS += duktape/duktape.o
|
|
|
|
serialmux: $(OBJS)
|
|
$(LD) -o $@ $^ $(LDFLAGS)
|
|
|
|
clean:
|
|
@rm -rf $(OBJS)
|
|
|
|
pkg: serialmux contrib/serialmux.ini contrib/serialmux.service contrib/install.sh
|
|
@rm -f serialmux-v$(VER).tar
|
|
@rm -f serialmux-v$(VER).tar.xz
|
|
@mkdir -p $(PTMPDIR)
|
|
@cp $^ $(PTMPDIR)
|
|
@tar cf serialmux-v$(VER).tar $(PTMPDIR)
|
|
@xz -9 serialmux-v$(VER).tar
|
|
@rm -rf $(PTMPDIR)
|
|
|
|
|