argv0-test/Makefile

26 lines
502 B
Makefile
Raw Permalink Normal View History

2022-01-26 20:39:00 +00:00
.PHONY: all
all: build/parent-null build/parent-ptr build/child
build:
@mkdir -p build
build/parent-null: build
$(CC) -o build/parent-null src/parent.c
build/parent-ptr: build
$(CC) -o build/parent-ptr -DPTR_TO_NULL src/parent.c
build/child: build
$(CC) -o build/child src/child.c
.PHONY: test
test: all
@echo "==> Testing execve with &NULL..."
2022-01-26 20:39:00 +00:00
./build/parent-ptr ./build/child
@echo "==> Testing execve with NULL..."
./build/parent-null ./build/child
.PHONY: clean
clean:
@rm -fr build