back to scratko.xyz
aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorscratko <m@scratko.xyz>2024-03-31 21:05:36 +0300
committerscratko <m@scratko.xyz>2024-03-31 21:05:36 +0300
commit7d07ff825dc7cff7ee80b04346e0d2c49a91e190 (patch)
treef3bf4c72c22107b0d74143f09af39b0071106540 /Makefile
downloadarithmetic-expression-computator-7d07ff825dc7cff7ee80b04346e0d2c49a91e190.tar.gz
arithmetic-expression-computator-7d07ff825dc7cff7ee80b04346e0d2c49a91e190.tar.bz2
arithmetic-expression-computator-7d07ff825dc7cff7ee80b04346e0d2c49a91e190.zip
Initial commit
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..4e837c8
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,19 @@
+CC=gcc
+CFLAGS=-c -Wall -fno-stack-protector -m32
+
+ASM=nasm
+ASMFLAGS=-f elf
+
+BUILDFLAGS=-m elf_i386
+
+all: arith_exp
+
+%.o: %.asm
+ $(ASM) $(ASMFLAGS) $< -o $@
+%.o: %.c %.h
+ $(CC) $(CFLAGS) $< -o $@
+
+OBJMODULES= start.o calls.o stack.o arith_exp.o
+
+arith_exp: $(OBJMODULES)
+ $(LD) $(BUILDFLAGS) $^ -o $@