26 lines
502 B
Makefile
26 lines
502 B
Makefile
.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..."
|
|
./build/parent-ptr ./build/child
|
|
@echo "==> Testing execve with NULL..."
|
|
./build/parent-null ./build/child
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
@rm -fr build
|