aboutsummaryrefslogtreecommitdiff
path: root/snag
diff options
context:
space:
mode:
Diffstat (limited to 'snag')
-rw-r--r--snag/.gitignore2
-rw-r--r--snag/Makefile22
-rw-r--r--snag/main.c4
3 files changed, 26 insertions, 2 deletions
diff --git a/snag/.gitignore b/snag/.gitignore
new file mode 100644
index 0000000..5f2c517
--- /dev/null
+++ b/snag/.gitignore
@@ -0,0 +1,2 @@
+*.o
+snag \ No newline at end of file
diff --git a/snag/Makefile b/snag/Makefile
new file mode 100644
index 0000000..8fa032c
--- /dev/null
+++ b/snag/Makefile
@@ -0,0 +1,22 @@
+CC = gcc
+CFLAGS = -Wall -g
+
+TARGET = snag
+
+SRCS = main.c
+OBJS = $(SRCS:.c=.o)
+
+.SILENT: $(OBJS) $(TARGET)
+
+all: $(TARGET)
+
+clean:
+ rm -f $(OBJS) $(TARGET)
+
+$(TARGET): $(OBJS)
+ printf " LD %s\n" $@
+ $(CC) $(CFLAGS) -o $@ $<
+
+%.o: %.c
+ printf " CC %s\n" $<
+ $(CC) $(CFLAGS) -c $< -o $@
diff --git a/snag/main.c b/snag/main.c
index 25f0d28..8a3b3be 100644
--- a/snag/main.c
+++ b/snag/main.c
@@ -1,3 +1,3 @@
-int main() {
- return 1;
+int main(int argc, char* argv[]) {
+ return 0;
}