diff options
| author | mo khan <mo@mokhan.ca> | 2017-01-03 12:15:54 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2017-01-03 12:15:54 -0700 |
| commit | f9898440349580c95603a4e691bdd9600712b301 (patch) | |
| tree | bde7c2c085b63b4f38695726509b5c744329d018 | |
| parent | b9a8e9ccb80b78dd30b669e0947e341318f2803a (diff) | |
create makefile.
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | Makefile | 14 | ||||
| -rw-r--r-- | bin/.gitkeep | 0 | ||||
| -rw-r--r-- | src/main.c (renamed from main.c) | 8 |
4 files changed, 22 insertions, 2 deletions
@@ -1 +1,3 @@ *.out +*.o +bin diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1ee69d1 --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +SHELL=/bin/sh +CFLAGS=-Wall -g -std=c99 -Isrc -lncurses +objects=main.o +exe=./bin/curse-you + +all: $(objects) + $(CC) $(CFLAGS) -o $(exe) $(objects) + $(exe) + +clean: + rm -fr $(exe) $(objects) + +main.o: src/main.c + $(CC) $(CFLAGS) -c src/main.c diff --git a/bin/.gitkeep b/bin/.gitkeep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/bin/.gitkeep @@ -1,11 +1,15 @@ #include <ncurses.h> -int main(int argc, const char *argv[]) -{ +void hello_world() { initscr(); printw("Hello world!!!"); refresh(); getch(); endwin(); +} + +int main(int argc, const char *argv[]) +{ + hello_world(); return 0; } |
