aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 5 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 25fb9ac..68e03d9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
####################### path name ##########################
-PWD = $(shell pwd)
+PWD = .
LIB = $(PWD)/lib
OBJ = $(PWD)/obj
@@ -16,7 +16,7 @@ AR_OPT := cvr
EXAMPLE_CC := gcc $(GCC_OPT) -o
-OBJ_CC := gcc $(GCC_OPT) -c
+OBJ_CC := gcc $(GCC_OPT) -c -o
SLIB_CC := ar $(AR_OPT)
######################## targets ###########################
@@ -28,8 +28,8 @@ OBJFIL := $(foreach n,$(OBJECT),$(OBJ)/$(n).o)
TARGET := $(LIB)/libctl.a
-EMPFIL := $(EMP)/example.c
-EMPOUT := $(EMP)/example
+EMPFIL := example.c
+EMPOUT := example
######################## setting ###########################
.SUFFIXES:
@@ -47,9 +47,7 @@ $(TARGET): $(OBJFIL)
$(OBJFIL): $(OBJ)/%.o: $(SRC)/%.c $(INC)/%.h
@echo 'make object file .......... $@'
- @cd $(OBJ) && $(OBJ_CC) $<
-
-example: $(EMPOUT);
+ @$(OBJ_CC) $@ $<
$(EMPOUT): $(EMPFIL) $(TARGET)
@echo 'make test program for ...... $^'