diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2db3799 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +hello +*.o diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..579a2f8 --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ + +TARGET = hello + +SRCS = hello.c + +OBJS = $(SRCS:.c=.o) + +.PHONY: all +all: $(TARGET) + +$(TARGET): $(OBJS) + $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) diff --git a/hello.c b/hello.c new file mode 100644 index 0000000..7d38eaf --- /dev/null +++ b/hello.c @@ -0,0 +1,7 @@ +#include + +int main() +{ + printf("Hello, World!\n"); + return 0; +}