Skip to content

Instantly share code, notes, and snippets.

@Sasha-hk
Created May 9, 2022 08:29
Show Gist options
  • Save Sasha-hk/39881b1c714dffa9f8e953eaac07b6ec to your computer and use it in GitHub Desktop.
Save Sasha-hk/39881b1c714dffa9f8e953eaac07b6ec to your computer and use it in GitHub Desktop.

Make file example

CC=g++
CFLAGS=-g -w -Wall

main: main.o
	$(CC) $(CFLAGS) -o main main.o

main.o: ./src/main.cpp algorithm.o cli.o
	$(CC) $(CFLAGS) -c ./src/main.cpp

algorithm.o: ./src/algorithm.cpp stack.o date.o cli.o
	$(CC) $(CFLAGS) -c ./src/algorithm.cpp

stack.o: ./include/stack.hpp
	$(CC) $(CFLAGS) -c ./include/stack.hpp

date.o: ./include/date.hpp
	$(CC) $(CFLAGS) -c ./include/date.hpp

cli.o: ./include/cli.hpp
	$(CC) $(CFLAGS) -c ./include/cli.hpp

clean:
	rm *.o *.s *.bc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment