Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CC = gcc
- FILES = workfile.c insert.c
- TARGETS = exe
- CFLAGS = -o
- DBUG =
- RM = rm -f
- OBJS = *.o
- #Master Rule
- all: $(TARGETS)
- #Build
- exe: workfile.o insert.o
- $(CC) $(CFLAGS) $(DBUG) workfile.o insert.o exe
- #workfile
- workfile.o: workfile.c
- $(CC) $(DBUG) -c *.c
- insert.o: insert.c
- $(CC) $(DBUG) -c *.c
- clean:
- $(RM) $(TARGETS) $(OBJS)
- $make all
- gcc -c *.c
- gcc -o workfile.o insert.o exe
- gcc: error: exe: No such file or directory
- make: *** [exe] Error 1
- exe: workfile.o insert.o
- $(CC) $(CFLAGS) $(DBUG) workfile.o insert.o exe
- exe: workfile.o insert.o
- $(CC) $(CFLAGS) $(DBUG) -o exe workfile.o insert.o
- CC = gcc
- FILES = workfile.c insert.c
- TARGETS = exe
- CFLAGS =
- DBUG =
- RM = rm -f
- OBJS = *.o
- #Master Rule
- all: $(TARGETS)
- #Build
- exe: workfile.o insert.o
- $(CC) $(CFLAGS) $(DBUG) -o exe workfile.o insert.o
- #workfile
- workfile.o: workfile.c
- $(CC) $(DBUG) -o workfile.o -c workfile.c
- insert.o: insert.c
- $(CC) $(DBUG) -o insert.o -c insert.c
- clean:
- $(RM) $(TARGETS) $(OBJS)
- CFLAGS = -Wall -Wextra -Werror
- exe: workfile.o insert.o
- $(CC) $(CFLAGS) $(DBUG) workfile.o insert.o -o exe
- CFLAGS =
- OUTFILE = fancy_exe
- [...]
- $(CC) $(CFLAGS) $(DBUG) workfile.o insert.o -o $(OUTFILE)
Add Comment
Please, Sign In to add comment