commit 7aefdcdc7ff908248c6aa36b07d2313d7962772c Author: Lexi Quinn Date: Wed Aug 11 23:50:59 2021 +1000 initial helloworld diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f6d7900 --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +TARGET = qtimer +LIBS = -lm +CC = gcc +CFLAGS = -g -Wall + +.PHONY: default all clean + +default: $(TARGET) +all: default + +OBJECTS = $(patsubst %.c, %.o, $(wildcard *.c)) +HEADERS = $(wildcard *.h) + +%.o: %.c $(HEADERS) + $(CC) $(CFLAGS) -c $< -o $@ + +.PRECIOUS: $(TARGET) $(OBJECTS) + +$(TARGET): $(OBJECTS) + $(CC) $(OBJECTS) -Wall $(LIBS) -o $@ + +clean: + -rm -f *.o + -rm -f $(TARGET) diff --git a/timer.c b/timer.c new file mode 100644 index 0000000..2137eca --- /dev/null +++ b/timer.c @@ -0,0 +1,7 @@ +#include + +int main(char argc, char** argv) +{ + printf("Hello, World!\n"); + return 0; +}