Browse Source

Started establishing the build system

watermark_alloc
Cameron Weinfurt 1 year ago
parent
commit
6d5f24f135
  1. 1
      .gitignore
  2. 21
      Makefile
  3. 6
      main.c

1
.gitignore

@ -0,0 +1 @@
*.o

21
Makefile

@ -0,0 +1,21 @@
objs = main.o
CC = clang
OUT_NAME = the_alloc
dev: FLAGS= -g -D UNIT_TESTS
dev: $(OUT_NAME)
valgrind ./$(OUT_NAME)
release: FLAGS= -O2
release: clean $(OUT_NAME)
rm *.o
$(OUT_NAME): $(objs)
$(CC) $(FLAGS) -o $(OUT_NAME) $(objs)
clean:
rm -f *.o $(OUT_NAME)
main.o: main.c
$(CC) $(FLAGS) -c main.c -o main.o

6
main.c

@ -0,0 +1,6 @@
#include <stdio.h>
int main() {
printf("Hello, World!\n");
return 0;
}
Loading…
Cancel
Save