diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..91ec74f --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.o +hello-world diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..91e72ae --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ + +OBJS = src/main.o + +all: hello-world + +.c.o: + $(CC) $(CFLAGS) -c -o $@ $< + +hello-world: $(OBJS) + $(CC) $(LDFLAGS) -o $@ $(OBJS) + +clean: + rm -f $(OBJS) hello-world + diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..82f8eec --- /dev/null +++ b/src/main.c @@ -0,0 +1,6 @@ +#include + +int main(void) { + printf("Hello, world!\n"); + return 0; +}