summaryrefslogtreecommitdiff
path: root/libc/termios/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'libc/termios/Makefile')
-rw-r--r--libc/termios/Makefile28
1 files changed, 14 insertions, 14 deletions
diff --git a/libc/termios/Makefile b/libc/termios/Makefile
index 7903bc2..cfc3baa 100644
--- a/libc/termios/Makefile
+++ b/libc/termios/Makefile
@@ -2,9 +2,6 @@
# This file is part of the Linux-8086 C library and is distributed
# under the GNU Library General Public License.
-TOP=..
-include $(TOP)/Make.defs
-
TSRC=termios.c
TOBJ=tcsetattr.o tcgetattr.o tcdrain.o tcflow.o tcflush.o tcsendbreak.o \
tcsetpgrp.o tcgetpgrp.o isatty.o \
@@ -12,19 +9,22 @@ TOBJ=tcsetattr.o tcgetattr.o tcdrain.o tcflow.o tcflush.o tcsendbreak.o \
ifeq ($(LIB_OS),ELKS)
OBJ=$(TOBJ) ttyname.o
-else
-OBJ=
-endif
-all: $(OBJ)
+CFLAGS=$(ARCH) $(CCFLAGS) $(DEFS)
-libc.a: $(OBJ)
- ar r ../$(LIBC) $(OBJ)
- @touch libc.a
+all: $(LIBC)
+ @:
-clean:
- rm -f *.o libc.a
+$(LIBC): $(LIBC)($(OBJ))
-$(TOBJ): $(TSRC)
- $(CC) $(CFLAGS) -c -DL_$* -o $@ $(TSRC)
+$(LIBC)($(TOBJ)): $(TSRC)
+ $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
+ $(AR) $(ARFLAGS) $@ $*.o
+ $(RM) $*.o
+else
+all:
+ @:
+endif
+clean:
+ rm -f *.o libc.a