initial helloworld

This commit is contained in:
Lexi Quinn 2021-08-11 23:50:59 +10:00
commit 7aefdcdc7f
2 changed files with 31 additions and 0 deletions

24
Makefile Normal file
View File

@ -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)

7
timer.c Normal file
View File

@ -0,0 +1,7 @@
#include <stdio.h>
int main(char argc, char** argv)
{
printf("Hello, World!\n");
return 0;
}