initial helloworld
This commit is contained in:
commit
7aefdcdc7f
24
Makefile
Normal file
24
Makefile
Normal 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)
|
Loading…
Reference in New Issue
Block a user