0
|
1 |
CC=gcc -g -ggdb
|
|
2 |
CFLAGS=-Wall -O2 -Iinclude -ansi
|
|
3 |
NASM=nasm -f elf -Iinclude/
|
|
4 |
TARGET=client server
|
|
5 |
SOBJECTS=server.o set_limit.o
|
|
6 |
COBJECTS=client.o
|
|
7 |
|
|
8 |
.SUFFIXES: .c .asm
|
|
9 |
|
|
10 |
.c.o:
|
|
11 |
@echo Compiling $< ...
|
|
12 |
@$(CC) -c $(CFLAGS) -o $@ $<
|
|
13 |
|
|
14 |
all: $(TARGET)
|
|
15 |
|
|
16 |
server: $(SOBJECTS)
|
|
17 |
@echo Linking $< ...
|
|
18 |
@$(CC) $(CFLAGS) -o $@ $(SOBJECTS)
|
|
19 |
|
|
20 |
client: $(COBJECTS)
|
|
21 |
@echo Linking $< ...
|
|
22 |
@$(CC) $(CFLAGS) -o $@ $(COBJECTS)
|
|
23 |
|
|
24 |
.PHONY: clean uninstall
|
|
25 |
|
|
26 |
clean:
|
|
27 |
rm -f *.o *~
|
|
28 |
rm -f $(TARGET)
|