CC=gcc CFLAGS=-Wall STC=stc_dso_breaks_fork LIBS=-ldl .PHONY: test test-nofail test: $(STC) mod_test.dll ./$(STC) test-nofail: $(STC) mod_test.dll ./$(STC) no-fail $(STC): $(STC).c $(CC) $(CFLAGS) -o $@ $^ $(LIBS) mod_test.dll: mod_test.o $(CC) -shared -o $@ $^ mod_test.o: mod_test.c $(CC) $(CFLAGS) -c $^ .PHONY: clean clean: rm -f $(STC) mod_test.o mod_test.dll $(STC).exe.stackdump