Commit 6f15f85e authored by Carit Zhu's avatar Carit Zhu 🎱

Modify Makefile for adding MACRO of CROSS_COMPILE and modify gitignore.

parent 9f5cc878
### Temp files ###
*.*~
*.o
timemanager
### VS Code ###
/.vscode/
CC = gcc
CFLAGS = `pkg-config --cflags gtk+-3.0`
LIBS = `pkg-config --libs gtk+-3.0`
# Set CROSS_COMPILE
CROSS_COMPILE ?=
# Make variables (CC, etc...)
CC = $(CROSS_COMPILE)gcc
CFLAGS = `pkg-config --cflags gtk+-3.0`
LIBS = `pkg-config --libs gtk+-3.0`
# Objects
objects = main.o
# Default target
all: timemanager
timemanager: main.c
# Build objects
timemanager: $(objects)
# Temp objects
%.o: %.c
$(CC) $(CFLAGS) $< -o $@ $(LIBS)
# Clean
.PHONY: clean
clean:
rm *.o timemanager
rm -f *.o timemanager
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment