Skip to content

Commit

Permalink
make: Move code
Browse files Browse the repository at this point in the history
  • Loading branch information
hurufu committed Apr 16, 2024
1 parent 041901d commit 25d7d7a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ ALL_PLIST := $(ALL_C:.c=.plist)
LIBCOMULTI_C := coro.c contextring.c eventloop.c suspendables.c
LIBCOMULTI_O := $(LIBCOMULTI_C:.c=.o)

BUILD_DIR ?= build

vpath %.rl $(PROJECT_DIR)/fsm
vpath %.c $(addprefix $(PROJECT_DIR)/,. multitasking multitasking/coro)
vpath %.t $(PROJECT_DIR)
Expand Down Expand Up @@ -74,6 +76,8 @@ protocol.png: protocol.rl protocol-adjust.sed
ragel -p -V $(word 1,$^) | sed -Ef $(word 2,$^) | dot -Tpng -Gdpi=200 -o $@
first_level.png: first_level.rl first_level-adjust.sed
ragel -p -V $(word 1,$^) | sed -Ef $(word 2,$^) | dot -Tpng -Gdpi=200 -o $@
dir-%: | $(BUILD_DIR)/
+$(MAKE) -C $< $(addprefix -f ,$(abspath $(MAKEFILE_LIST))) $*

# Internal targets #############################################################
tags:
Expand Down Expand Up @@ -120,7 +124,3 @@ clean: F += $(wildcard *.gcda *.gcno *.gcov)
clean: F += $(wildcard frob.log frob.sum frob.debug mut)
clean: F += $(wildcard $(ALL_PLIST))
clean: F += $(wildcard evloop.o evloop.debug evloop.s evloop)

BUILD_DIR ?= build
dir-%: | $(BUILD_DIR)/
+$(MAKE) -C $< $(addprefix -f ,$(abspath $(MAKEFILE_LIST))) $*

0 comments on commit 25d7d7a

Please sign in to comment.