Difference: MakefileExample (1 vs. 2)

Revision 22008-01-27 - XiaomingGu

Line: 1 to 1
 
META TOPICPARENT name="ProjectHome"
In the following Makefile, it assumes that your testing program is named loop.

Revision 12008-01-27 - XiaomingGu

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="ProjectHome"
In the following Makefile, it assumes that your testing program is named loop.

CC = /p/compiler2/xiaoming/csc455/bin/bin/gcc

TARGET = loop

SOURCE = $(TARGET).c

OBJECT = $(TARGET).o

BINARY = $(TARGET)

LIB = cs255-lib

LIB_SOURCE = $(LIB).c

LIB_OBJECT = $(LIB).o

OPT = -O2

CS255 = -fcs255

DUMP_GIMPLE = -fdump-tree-gimple

$(BINARY): $(OBJECT) $(LIB_OBJECT)

$(CC) $(OBJECT) $(LIB_OBJECT) -o $(BINARY)

$(OBJECT): $(SOURCE) $(CC) $(OPT) $(CS255) $(DUMP_GIMPLE) $(SOURCE) -c -o $(OBJECT)

$(LIB_OBJECT): $(LIB_SOURCE) $(CC) $(OPT) $(LIB_SOURCE) -c -o $(LIB_OBJECT)

clean: -rm -rf $(BINARY) $(OBJECT) $(LIB_OBJECT)

-- XiaomingGu - 27 Jan 2008

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding URCS? Send feedback