|
Idiotic listserver!
Here's the patch inline:
diff -ru cvs-legOS/Makefile.common work-legOS/Makefile.common
--- cvs-legOS/Makefile.common Sun May 27 18:01:56 2001
+++ work-legOS/Makefile.common Thu Mar 28 21:26:06 2002
@@ -11,15 +11,14 @@
#
#
-# DJGPP does not define OSTYPE
+# Get an OSTYPE if not set
#
ifndef OSTYPE
-# Uncomment subsequent lines if some environment != DJGPP do not define OSTYPE
-# OSTYPE=$(shell uname)
-# # Last resort if uname is unavailable
-# ifndef OSTYPE
+ OSTYPE=$(shell uname)
+ # Last resort if uname is unavailable (DJGPP does not define OSTYPE)
+ ifndef OSTYPE
OSTYPE=MSDOS
-# endif
+ endif
endif
# Hitachi H8 tool prefix
@@ -29,27 +28,11 @@
SED_SFLAG=
#
-# WindowsNT/Cygnwin, test against several values:
+# Cygwin
#
-ifneq (,$(findstring $(OSTYPE),cygwin32 CYGWIN_NT-4.0 WindowsNT Windows_NT))
+ifneq (,$(findstring CYGWIN,$(OSTYPE)))
-# NT
TOOLPREFIX=h8300-hms-
-SED_SFLAG=i
-
-endif
-
-#
-# 2001.01.16 - Paolo Masetti <paolo.masetti@itlug.org>
-#
-# - Added definition for Cygwin 1.1
-
-#
-# Cygwin 1.1
-#
-ifneq (,$(findstring $(OSTYPE),cygwin))
-
-TOOLPREFIX=h8300-hitachi-hms-
SED_SFLAG=i
endif
diff -ru cvs-legOS/util/Makefile work-legOS/util/Makefile
--- cvs-legOS/util/Makefile Tue Feb 13 21:16:17 2001
+++ work-legOS/util/Makefile Thu Mar 28 22:01:04 2002
@@ -41,7 +41,6 @@
firmdl3$(EXT):
$(MAKE) $(MFLAGS) -C firmdl || exit 2
- cp firmdl/firmdl3$(EXT) .
fontdesign$(EXT): fontdesign.c
$(CC) fontdesign.c -o $@ $(CFLAGS)
diff -ru cvs-legOS/util/Makefile.common work-legOS/util/Makefile.common
--- cvs-legOS/util/Makefile.common Thu Jul 27 23:43:38 2000
+++ work-legOS/util/Makefile.common Thu Mar 28 21:36:36 2002
@@ -7,10 +7,14 @@
#
#
-# DJGPP does not define OSTYPE
+# Get an OSTYPE if not set
#
ifndef OSTYPE
- OSTYPE=MSDOS
+ OSTYPE=$(shell uname)
+ # Last resort if uname is unavailable (DJGPP does not define OSTYPE)
+ ifndef OSTYPE
+ OSTYPE=MSDOS
+ endif
endif
# Linux, IRIX
@@ -19,20 +23,21 @@
CFLAGS=-O2 -Wall
#
-# WindowsNT/Cygnwin, test against several values:
+# Cygwin
#
-ifneq (,$(findstring $(OSTYPE),cygwin32 CYGWIN_NT-4.0 WindowsNT Windows_NT))
+ifneq (,$(findstring CYGWIN,$(OSTYPE)))
EXT=.exe
CC =gcc
+ CFLAGS+=-D_WIN32
endif
ifneq (,$(findstring $(OSTYPE),MSDOS msdosdjgpp MS-DOS))
#
-# Put here DJPP defines
+# Put here DJGPP defines
# --------------------------
EXT=.exe
CC=gccw32
# --------------------------
endif
-MAKEDEPEND =$(CC) -M
\ No newline at end of file
+MAKEDEPEND=$(CC) -M
diff -ru cvs-legOS/util/dll-src/Makefile work-legOS/util/dll-src/Makefile
--- cvs-legOS/util/dll-src/Makefile Mon May 21 18:32:50 2001
+++ work-legOS/util/dll-src/Makefile Thu Mar 28 22:07:44 2002
@@ -10,15 +10,15 @@
include ../Makefile.common
-TARGET1=dll$(EXT)
+TARGET1=../dll$(EXT)
SRCS1=loader.c rcxtty.c keepalive.c ../../kernel/lnp.c lx.c
-OBJS1=$(SRCS1:.c=.o)
+OBJS1=$(notdir $(SRCS1:.c=.o))
-TARGET2=makelx$(EXT)
+TARGET2=../makelx$(EXT)
SRCS2=convert.c srec.c srecload.c lx.c
OBJS2=$(SRCS2:.c=.o)
-SINGLE_SRC_TARGETS=genlds$(EXT) fixdeps$(EXT)
+SINGLE_SRC_TARGETS=../genlds$(EXT) ../fixdeps$(EXT)
ALL_TARGETS=$(TARGET1) $(TARGET2) $(SINGLE_SRC_TARGETS)
LIBS=
@@ -26,14 +26,12 @@
#
# Martin Cornelius solution to include problems (avoid -I/usr/include)
#
-CFLAGS=-O2 -Wall -I. -I../../include/lnp
+CFLAGS+=-I. -I../../include/lnp
all: $(ALL_TARGETS)
- cp -f $(ALL_TARGETS) ..
clean:
rm -f *.o *~ *.bak $(ALL_TARGETS)
- $(CC) -M $(CFLAGS) -c $(SRCS1) $(SRCS2) >.depend
depend:
$(CC) -M $(CFLAGS) -c $(SRCS1) $(SRCS2) >.depend
@@ -47,7 +45,10 @@
%.o: %.c
$(CC) -o $@ -c $< $(CFLAGS)
-%$(EXT): %.c
+%.o: ../../kernel/%.c
+ $(CC) -o $@ -c $< $(CFLAGS)
+
+../%$(EXT): %.c
$(CC) -o $@ $< $(CFLAGS)
# DO NOT DELETE
diff -ru cvs-legOS/util/firmdl/Makefile work-legOS/util/firmdl/Makefile
--- cvs-legOS/util/firmdl/Makefile Mon May 1 23:16:08 2000
+++ work-legOS/util/firmdl/Makefile Thu Mar 28 22:05:44 2002
@@ -24,12 +24,12 @@
include ../Makefile.common
-all: fastdl.h firmdl3$(EXT)
+all: fastdl.h ../firmdl3$(EXT)
mkimg$(EXT): mkimg.o srec.o
$(CC) $^ -o $@ $(CFLAGS)
-firmdl3$(EXT): firmdl.o srec.o rcx_comm.o
+../firmdl3$(EXT): firmdl.o srec.o rcx_comm.o
$(CC) $^ -o $@ $(CFLAGS)
fastdl.h: mkimg$(EXT) fastdl.srec
----- Original Message -----
From: "Max Bowsher" <maxb@ukf.net>
To: <lugnet.robotics.rcx.legos@lugnet.com>
Sent: Friday, March 29, 2002 5:42 PM
Subject: Makefile patch
> Hi - the makefiles don't work at the moment for legOS on cygwin - this patch
> fixes that. It also stops a dependency generation command from being invoked by
> make clean, and, in the util directory, instead of compiling firmdl3, dll, and
> others in util/firmdl and util/dll-src, then copying them up a level, it just
> makes them directly into util/.
>
> If you want me to break it up into seperate patches, then I will.
>
>
> Max.
>
>
>
> --
> MIME ATTACHMENTS DISCARDED:
>
> 1. Content-Type: application/octet-stream;
> name="fix-makefiles.patch"
> Content-Transfer-Encoding: quoted-printable
> Content-Disposition: attachment;
> filename="fix-makefiles.patch"
> Content-Length: 5063
>
|
|
Message is in Reply To:
| | Makefile patch
|
| Hi - the makefiles don't work at the moment for legOS on cygwin - this patch fixes that. It also stops a dependency generation command from being invoked by make clean, and, in the util directory, instead of compiling firmdl3, dll, and others in (...) (23 years ago, 29-Mar-02, to lugnet.robotics.rcx.legos)
|
3 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|