Advertisement
austecliano

Make Trab EDI

Sep 9th, 2011
388
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 1.47 KB | None | 0 0
  1. FONTE=src/
  2. LIB=lib/
  3. BIN=bin/
  4. CC=/usr/bin/gcc
  5. INCLUDE = -I"/usr/include"
  6. TMP_DIR=tmp/
  7. BIN_NAME=trab1
  8. 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
  9. CFLAGS = -W -Wall -ansi
  10.  
  11. lib:
  12.     @echo --Criando diretorio temporario--
  13.     @echo .
  14.     mkdir -p ${TMP_DIR}
  15.     @echo .
  16.     @echo --Compilando as bibliotecas--
  17.     @echo .
  18.     ${CC} ${FONTE}arqutil.c -o ${TMP_DIR}arqutil.o -c ${INCLUDE}
  19.     ${CC} ${FONTE}main.c -o ${TMP_DIR}main.o -c ${INCLUDE}
  20.     ${CC} ${FONTE}insertion.c -o ${TMP_DIR}insertion.o -c ${INCLUDE}
  21.     ${CC} ${FONTE}count.c -o ${TMP_DIR}count.o -c ${INCLUDE}
  22.     ${CC} ${FONTE}bucket.c -o ${TMP_DIR}bucket.o -c ${INCLUDE}
  23.     ${CC} ${FONTE}radix.c -o ${TMP_DIR}radix.o -c ${INCLUDE}
  24.     ${CC} ${FONTE}tab_hash.c -o ${TMP_DIR}tab_hash.o -c ${INCLUDE}
  25.     ${CC} ${FONTE}linked_list.c -o ${TMP_DIR}linked_list.o -c ${INCLUDE}
  26.     @echo .
  27.     @echo --Bibliotecas compiladas--
  28.    
  29. all:    lib
  30.     @echo .
  31.     @echo --Compilando o executavel--
  32.     @echo .
  33.     $(CC) ${FONTE}main.c $(OBJ) -o ${BIN}${BIN_NAME} -I. $(CFLAGS)
  34.     @echo .
  35.     @echo --Executavel compilado--
  36.  
  37. clean:
  38.     @echo --Removendo a pasta temp--
  39.     @echo .
  40.     rm -rf tmp
  41.     @echo --All Done--
  42.    
  43. remove:
  44.     @echo --Removendo o ${BIN_NAME} e seu link simbolico--
  45.     @echo .
  46.     rm -f ${BIN}${BIN_NAME}
  47.     rm -f ${BIN_NAME}
  48.     @echo --All Done--
  49.    
  50. install:
  51.     @echo --Criando link simbolico--
  52.     @echo .
  53.     ln -s bin/${BIN_NAME} ${BIN_NAME}
  54.     @echo .
  55.     @echo .
  56.     @echo --All Done--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement