Makefile 397 B

1234567891011121314151617181920212223
  1. CFLAGS = -Wall -std=c99 -I./inc -I./port
  2. LIB = -lm
  3. LINK =
  4. CC = gcc
  5. TARGET = application
  6. DLT645 = $(wildcard ./src/*.c)
  7. PORT = $(wildcard ./port/*.c)
  8. SAMPLE = $(wildcard ./sample/*.c)
  9. SRC = $(DLT645) $(PORT) $(SAMPLE)
  10. OBJS = $(patsubst %.c,%.o,$(SRC))
  11. $(TARGET):$(OBJS)
  12. $(CC) -o $(TARGET) $(OBJS) $(LIB)
  13. $(OBJS):%.o:%.c
  14. $(CC) $(CFLAGS) -c $< -o $@
  15. clean:
  16. rm -f $(OBJS)
  17. rm -f $(TARGET)