Git Product home page Git Product logo

sisop-cthreads's Introduction

sisop-cthreads

MakeFile

Cada c file precisa ter uma regra adicional, tambem precisa adicionar o .o de cada regra ao TARGETS_O para que a regra clean limpe todos os arquivos gerados no bin (exeto pelo support.o).

A regra all deve conter todas as regras para que seja possivel gerar todos os .o e ligalos na lib estatica libcthread.a

Exemplo:

CC=gcc
LIB_DIR=./lib
INC_DIR=./include
BIN_DIR=./bin
SRC_DIR=./src
TARGETS_O= ./bin/library.o
CFLAGS = -Wall

all: library libcthread

libcthread:
	ar crs $(LIB_DIR)/libcthread.a $(BIN_DIR)/library.o

library: $(BIN_DIR)/support.o $(SRC_DIR)/lib.c
	$(CC) -c $(SRC_DIR)/lib.c -o $(BIN_DIR)/library.o $(CFLAGS)

clean:
	rm -rf $(TARGETS_O) $(LIB_DIR)/*

Flags de compilação

-Wall : Ativa warnings de compilação
-o : Escreve o build output em um arquivo
-O : seta nivel de otimização
-c : compila sem linking

sisop-cthreads's People

Contributors

theolm avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.