Skip to content

Commit

Permalink
Revert "refactoring"
Browse files Browse the repository at this point in the history
This reverts commit 3e228c1.
  • Loading branch information
mdevaev committed Sep 4, 2024
1 parent f79a663 commit fcecc12
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
include lib.mk

-include config.mk

DESTDIR ?=
Expand All @@ -25,6 +23,10 @@ endif


# =====
define optbool
$(filter $(shell echo $(1) | tr A-Z a-z), yes on 1)
endef

ifeq ($(V),)
ECHO = @
endif
Expand Down
7 changes: 5 additions & 2 deletions janus/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
include ../lib.mk

R_DESTDIR ?=
PREFIX ?= /usr/local

Expand All @@ -19,6 +17,11 @@ _SRCS = $(shell ls src/uslibs/*.c src/*.c)
_BUILD = build


define optbool
$(filter $(shell echo $(1) | tr A-Z a-z), yes on 1)
endef


WITH_PTHREAD_NP ?= 1
ifneq ($(call optbool,$(WITH_PTHREAD_NP)),)
override _CFLAGS += -DWITH_PTHREAD_NP
Expand Down
3 changes: 0 additions & 3 deletions lib.mk

This file was deleted.

7 changes: 5 additions & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
include ../lib.mk

R_DESTDIR ?=
PREFIX ?= /usr/local

Expand Down Expand Up @@ -47,6 +45,11 @@ _TARGETS = $(_USTR) $(_DUMP)
_OBJS = $(_USTR_SRCS:%.c=$(_BUILD)/%.o) $(_DUMP_SRCS:%.c=$(_BUILD)/%.o)


define optbool
$(filter $(shell echo $(1) | tr A-Z a-z), yes on 1)
endef


ifneq ($(call optbool,$(WITH_GPIO)),)
override _CFLAGS += -DWITH_GPIO $(shell pkg-config --atleast-version=2 libgpiod 2> /dev/null && echo -DHAVE_GPIOD2)
override _USTR_LDFLAGS += -lgpiod
Expand Down

0 comments on commit fcecc12

Please sign in to comment.