Skip to content
Snippets Groups Projects
Select Git revision
  • fb76acb0844a2528c32610455a8c7cd5266f3027
  • master default protected
  • LUFA-170418
  • LUFA-151115
  • LUFA-140928
  • LUFA-140302
  • LUFA-130901
  • LUFA-130901-BETA
  • LUFA-130303
  • LUFA-120730
  • LUFA-120730-BETA
  • LUFA-120219
  • LUFA-120219-BETA
  • LUFA-111009
  • LUFA-111009-BETA
  • LUFA-110528
  • LUFA-110528-BETA
17 results

makefile

Blame
  • Makefile 760 B
    # Change your compiler here if you're not using gcc. CC is for C, and CXX is for C++.
    CC = gcc
    CXX = g++
    
    CFLAGS = -Wall -O3
    
    .PHONY: all
    all: basic_types control_structures functions
    
    # Here I'm using some of Make's built in variables: $@ and $<. The former gets substituted with the
    # name of the target. In this case, that's "loops". The latter gets substituted with the first
    # prerequisite. In this case, that's "loops.c". These are hard to remember, but can save you some
    # typing if you decide to rename things.
    basic_types: basic_types.c
    	$(CC) $(CFLAGS) -o $@ $<
    
    control_structures: control_structures.c
    	$(CC) $(CFLAGS) -o $@ $<
    
    functions: functions.c
    	$(CC) $(CFLAGS) -o $@ $<
    
    .PHONY: clean
    clean:
    	rm -f basic_types control_structures functions