LoginSignup
5
5

More than 5 years have passed since last update.

C言語のMakefileを作る

Last updated at Posted at 2012-12-26
Makefile
CC = gcc 
CFLAGS = -O3 -Wall
LIBRARIES = -lm -pthread
OBJECTS = main.o sub1.o sub2.o
PROGRAM = main

all: $(PROGRAM)

$(PROGRAM): $(OBJECTS)
    $(CC) $(OBJECTS) $(CFLAGS) $(LIBRARIES) -o $(PROGRAM)

clean:
    rm -f *.o $(PROGRAM)

参考

Make と Makefile の説明

5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5