From 852c7ad1af2e3283425dccd79b0923b7df12a388 Mon Sep 17 00:00:00 2001 From: FreeArtMan Date: Sun, 15 May 2016 22:30:26 +0100 Subject: Moved to new cmd. --- Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 4a6b232..444323d 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,21 @@ PROJECT=ihe CC=gcc -CFLAGS= +CFLAGS=-I./ SOURCES=buf.c core.c +SOURCES+=$(wildcard cmd/*.c) OBJECTS=$(SOURCES:.c=.o) LIB_OBJECTS=libcmd/libcmd.o libterm/libterm.o all: clean $(OBJECTS) $(PROJECT) $(PROJECT): - $(CC) $(CFLAGS) $(OBJECTS) $(LIB_OBJECTS) $(PROJECT).c -o $(PROJECT) + $(CC) -c $(PROJECT).c + ld -r $(OBJECTS) $(PROJECT).o -o $(PROJECT)_.o + + $(CC) $(CFLAGS) $(PROJECT)_.o $(LIB_OBJECTS) -o $(PROJECT) %.o: %.c - $(CC) $(CFLAGS) -c $< + $(CC) $(CFLAGS) -c $< -o $@ clean: rm -f $(PROJECT) -- cgit v1.2.3