Inital Commit
This commit is contained in:
23
Makefile
Normal file
23
Makefile
Normal file
@@ -0,0 +1,23 @@
|
||||
-include make.conf
|
||||
|
||||
BIN = tcpl
|
||||
|
||||
SRC = $(wildcard src/*.c)
|
||||
SRC_OBJ = $(SRC:.c=.o)
|
||||
|
||||
LIB_SRC = $(wildcard lib/*.c)
|
||||
LIB_OBJ = $(LIB_SRC:.c=.o)
|
||||
|
||||
all: $(BIN)
|
||||
|
||||
$(BIN): $(SRC_OBJ) $(LIB_OBJ)
|
||||
$(LD) $(LDFLAGS) -o $@ $(SRC_OBJ) $(LIB_OBJ)
|
||||
|
||||
src/%.o: src/%.c
|
||||
$(CC) $(CFLAGS) -I. -Iinclude -c $< -o $@
|
||||
|
||||
lib/%.o: lib/%.c
|
||||
$(CC) $(CFLAGS) -I. -Iinclude -c $< -o $@
|
||||
|
||||
clean:
|
||||
rm -f $(SRC_OBJ) $(LIB_OBJ) $(BIN)
|
||||
Reference in New Issue
Block a user