summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorbanana <delgadillo.tyler@gmail.com>2024-03-22 13:52:05 -0700
committerbanana <delgadillo.tyler@gmail.com>2024-03-22 13:52:05 -0700
commitf401289e371a76ff0dbaea40f7f94f7b85c4b2bd (patch)
tree30b66628375b55e2be46cc19b1290c78eed0269d /Makefile
Initial commitHEADmaster
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 23 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..c859442
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,23 @@
+.RECIPEPREFIX = >
+
+CC = gcc
+
+CFLAGS = -I$(INCDIR)
+
+INCDIR = inc
+OBJDIR = obj
+SRCDIR = src
+
+DEP = $(INCDIR)/tga.h $(INCDIR)/upc.h $(INCDIR)/num.h
+OBJ = $(OBJDIR)/main.o $(OBJDIR)/tga.o $(OBJDIR)/upc.o # $(OBJDIR)/cli.o
+
+$(OBJDIR)/%.o: $(SRCDIR)/%.c $(DEPS)
+> $(CC) -c -o $@ $< $(CFLAGS)
+
+upc: $(OBJ)
+> $(CC) -o $@ $^ $(CFLAGS)
+
+.PHONY: clean
+
+clean:
+> rm -f $(OBJDIR)/*.o ./*.tga upc