Advertisement
Narayan

makefile

Nov 23rd, 2014
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.58 KB | None | 0 0
  1. CC := sdcc
  2. INCDIR := "/media/Storage/Dropbox/ISEC/LEE_2012-2013/2º Ano/Cadeiras_2A_1S/Microprocessadores/sdcc-3.4.0"
  3. CFLAGS := -mmcs51 --iram-size 256 --xram-size 65536 --code-size 65536 --nooverlay --noinduction --verbose --debug -V --std-sdcc99 --model-large -I $(INCDIR)
  4.  
  5. # Só precisas de alterar esta linha
  6. SOURCES := lcd.c multiplexed_led.c simple_keypad.c
  7.  
  8. OBJECTS := $(patsubst %.c, %.rel, $(SOURCES))
  9.  
  10. BINARY := program
  11.  
  12. all: $(BINARY)
  13.  
  14. $(BINARY): main.c $(OBJECTS)
  15.     $(CC) $(CFLAGS) -o $@ $^
  16.  
  17. %.rel: %.c
  18.     $(CC) $(CFLAGS) -c -o $@ $<
  19.  
  20. clean:
  21.     rm -f $(BINARY) $(OBJECTS)
  22.  
  23. .PHONY: clean
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement