Skip to content

Instantly share code, notes, and snippets.

@zeako
Created August 2, 2015 21:02
Show Gist options
  • Save zeako/8e2d25549e7d17338fd0 to your computer and use it in GitHub Desktop.
Save zeako/8e2d25549e7d17338fd0 to your computer and use it in GitHub Desktop.
CC=gcc
CFLAGS=-Wall -ansi -pedantic -c
all: assembler
assembler: main.o utils.o fileprocessor.o hashtable.o assembler.o list.o
$(CC) -o assembler main.o utils.o fileprocessor.o hashtable.o assembler.o list.o
main.o: main.c fileprocessor.h assembler.h
$(CC) $(CFLAGS) main.c fileprocessor.h assembler.h
utils.o: utils.c utils.h
$(CC) $(CFLAGS) utils.c utils.h
fileprocessor.o: fileprocessor.c fileprocessor.h
$(CC) $(CFLAGS) fileprocessor.c fileprocessor.h
hashtable.o: hashtable.c hashtable.h
$(CC) $(CFLAGS) hashtable.c hashtable.h
list.o: list.c list.h
$(CC) $(CFLAGS) list.c list.h
assembler.o: assembler.c assembler.h
$(CC) $(CFLAGS) assembler.c assembler.h
clean:
rm *.o -f
rm assembler.exe -f
rm assembler -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment