Skip to content

Commit

Permalink
add hello world
Browse files Browse the repository at this point in the history
  • Loading branch information
zsarge committed Oct 29, 2024
1 parent f4fb00b commit c274a84
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Compiled object files
*.o

# Executables
example
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
CC=gcc
CFLAGS=-g -Wall -Werror

all: example

example: example.o
$(CC) $(CFLAGS) -o $@ $^

example.o: example.c
$(CC) $(CFLAGS) -c $<

clean:
rm -f example example.o
6 changes: 6 additions & 0 deletions example.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include <stdio.h>

int main() {
printf("hello world!\n");
}

0 comments on commit c274a84

Please sign in to comment.