Created
July 6, 2013 14:12
-
-
Save LordAmit/5940007 to your computer and use it in GitHub Desktop.
My first make file that worked as I wanted. Will use this for future references.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CC = gcc | |
CFLAGS = -lm | |
all: mm1 | |
backup: | |
cd .. && zip chap1_c_backup.zip chap1_c/* | |
mm1: lcgrand.o mm1.o | |
@echo making everything nice and sweet to mm1 | |
gcc -o mm1 mm1.o lcgrand.o -lm | |
lcgrand.o: lcgrand.c | |
@echo compiling lcgrand.c file to lcgrand.o | |
gcc -c lcgrand.c | |
mm1.o: mm1.c | |
@echo compiling mm1.c file to object file mm1.o | |
gcc -c mm1.c | |
clean: | |
@echo removing garbages | |
rm mm1.o lcgrand.o mm1 | |
help: | |
@echo type make help for this message | |
@echo type make clean to clean object files | |
@echo type make backup to make backup file of this work folder | |
@echo type make mm1 to make executable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment