diff --git a/01_exit/makefile b/01_exit/makefile deleted file mode 100644 index a685760..0000000 --- a/01_exit/makefile +++ /dev/null @@ -1,12 +0,0 @@ - -build: - @as -o output.out ./*.s - @ld -o output output.out - -run: - $(MAKE) build - @./output $(EXEC) - $(MAKE) clear - -clear: - @rm -rf ./*.out output diff --git a/02_hello/makefile b/02_hello/makefile deleted file mode 100644 index a685760..0000000 --- a/02_hello/makefile +++ /dev/null @@ -1,12 +0,0 @@ - -build: - @as -o output.out ./*.s - @ld -o output output.out - -run: - $(MAKE) build - @./output $(EXEC) - $(MAKE) clear - -clear: - @rm -rf ./*.out output diff --git a/makefile b/makefile new file mode 100644 index 0000000..56ced6b --- /dev/null +++ b/makefile @@ -0,0 +1,13 @@ +EXEC_DIR=$(shell find -type d -name $(target_dir)*) + +build: + @as -o $(EXEC_DIR)/output.out $(EXEC_DIR)/*.s + @ld -o $(EXEC_DIR)/output $(EXEC_DIR)/output.out + +run: + $(MAKE) build + @$(EXEC_DIR)/output $(EXEC) + $(MAKE) clear + +clear: + @rm -rf $(EXEC_DIR)/*.out $(EXEC_DIR)/output diff --git a/output.out b/output.out new file mode 100644 index 0000000..ae20f59 Binary files /dev/null and b/output.out differ