#target: dependency_1 dependency_2 dependency_3 ... # command # RM = /bin/rm -f OBJ = main.o pqconfo.o file2char.o EXE = main CC = /usr/bin/gcc CFLAGS = -Wall # all: $(EXE) # $(EXE): $(OBJ) $(CC) $(CFLAGS) $(OBJ) -L/usr/lib/x86_64-linux-gnu -lconfig -lulfius -lpq -ljansson -o $(EXE) # pqconfo.o: pqconfo.c pqconfo.h $(CC) -c pqconfo.c -o pqconfo.o # file2char.o: file2char.c file2char.h $(CC) -c file2char.c -o file2char.o # main.o: main.c $(CC) -I/usr/include/postgresql -c main.c -o main.o # clean: $(RM) $(OBJ) $(EXE) *~