makefile 968 B

1234567891011121314151617181920212223242526272829303132
  1. GTK_FLAGS = `pkg-config --cflags gtk+-3.0`
  2. GTK_LIBS = `pkg-config --libs gtk+-3.0`
  3. OBJECTS = $(patsubst src/%.c, build/%.o, $(wildcard src/*.c))
  4. run: build
  5. ./crypt data/example.csv
  6. clean:
  7. rm build/*.o crypt
  8. build: $(OBJECTS)
  9. gcc $(GTK_LIBS) build/*.o -o crypt
  10. build/main.o: src/main.c
  11. gcc -c $(GTK_FLAGS) src/main.c -o build/main.o
  12. build/builder.o: src/builder.c src/builder.h
  13. gcc -c $(GTK_FLAGS) src/builder.c -o build/builder.o
  14. build/logic.o: src/logic.c src/logic.h
  15. gcc -c $(GTK_FLAGS) src/logic.c -o build/logic.o
  16. build/generate_from_file.o: src/generate_from_file.c src/generate_from_file.h
  17. gcc -c $(GTK_FLAGS) src/generate_from_file.c -o build/generate_from_file.o
  18. build/generate_single.o: src/generate_single.c src/generate_single.h
  19. gcc -c $(GTK_FLAGS) src/generate_single.c -o build/generate_single.o
  20. build/password_generator.o: src/password_generator.c src/password_generator.h
  21. gcc -c src/password_generator.c -o build/password_generator.o