Skip to content

Commit

Permalink
add hello world
Browse files Browse the repository at this point in the history
  • Loading branch information
timmy00274672 committed Feb 14, 2020
1 parent fd2742b commit 61f5b7f
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

all: src/hello

src/hello: src/hello.c
@echo "CFLAGS=$(CFLAGS)" | \
fold -s -w 70 | \
sed -e 's/^/# /'
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDCFLAGS) -o $@ $^

install: src/hello
install -D src/hello \
$(DESTDIR)$(prefix)/bin/hello

clean:
-rm -f src/hello

distclean: clean

uninstall:
-rm -f $(DESTDIR)$(prefix)/bin/hello

.PHONY: all install clean distclean uninstall


9 changes: 9 additions & 0 deletions src/hello.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include <stdio.h>
int
main()
{
printf("Hello, world!\n");
return 0;
}


0 comments on commit 61f5b7f

Please sign in to comment.