Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FONTE=src/
- LIB=lib/
- BIN=bin/
- CC=/usr/bin/gcc
- INCLUDE = -I"/usr/include"
- TMP_DIR=tmp/
- BIN_NAME=trab1
- OBJ=${TMP_DIR}arqutil.o ${TMP_DIR}insertion.o ${TMP_DIR}count.o ${TMP_DIR}bucket.o ${TMP_DIR}radix.o ${TMP_DIR}tab_hash.o ${TMP_DIR}linked_list.o
- CFLAGS = -W -Wall -ansi
- lib:
- @echo --Criando diretorio temporario--
- @echo .
- mkdir -p ${TMP_DIR}
- @echo .
- @echo --Compilando as bibliotecas--
- @echo .
- ${CC} ${FONTE}arqutil.c -o ${TMP_DIR}arqutil.o -c ${INCLUDE}
- ${CC} ${FONTE}main.c -o ${TMP_DIR}main.o -c ${INCLUDE}
- ${CC} ${FONTE}insertion.c -o ${TMP_DIR}insertion.o -c ${INCLUDE}
- ${CC} ${FONTE}count.c -o ${TMP_DIR}count.o -c ${INCLUDE}
- ${CC} ${FONTE}bucket.c -o ${TMP_DIR}bucket.o -c ${INCLUDE}
- ${CC} ${FONTE}radix.c -o ${TMP_DIR}radix.o -c ${INCLUDE}
- ${CC} ${FONTE}tab_hash.c -o ${TMP_DIR}tab_hash.o -c ${INCLUDE}
- ${CC} ${FONTE}linked_list.c -o ${TMP_DIR}linked_list.o -c ${INCLUDE}
- @echo .
- @echo --Bibliotecas compiladas--
- all: lib
- @echo .
- @echo --Compilando o executavel--
- @echo .
- $(CC) ${FONTE}main.c $(OBJ) -o ${BIN}${BIN_NAME} -I. $(CFLAGS)
- @echo .
- @echo --Executavel compilado--
- clean:
- @echo --Removendo a pasta temp--
- @echo .
- rm -rf tmp
- @echo --All Done--
- remove:
- @echo --Removendo o ${BIN_NAME} e seu link simbolico--
- @echo .
- rm -f ${BIN}${BIN_NAME}
- rm -f ${BIN_NAME}
- @echo --All Done--
- install:
- @echo --Criando link simbolico--
- @echo .
- ln -s bin/${BIN_NAME} ${BIN_NAME}
- @echo .
- @echo .
- @echo --All Done--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement