Skip to content

Commit

Permalink
Update Makefile: build all *.c files to *.lx files
Browse files Browse the repository at this point in the history
  • Loading branch information
maehw authored Jun 23, 2024
1 parent c656f04 commit b84f02e
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
### ==========================================================================
### $Id: Makefile,v 1.7 2002/10/17 05:05:40 stephmo Exp $
### FILE: demo/Makefile - make the C Language Demo Programs
### Based on demo/Makefile (C Language Demo Programs), v 1.7 2002/10/17
### brickOS - the independent LEGO Mindstorms OS
### --------------------------------------------------------------------------

# name for the brickOS kernel
LIBDIR = /usr/lib/brickos
KERNEL = $(LIBDIR)/brickOS

PROGRAMS=helloworld.lx
# Find all .c files and replace the .c extension with .lx
SOURCES = $(wildcard *.c)
PROGRAMS = $(SOURCES:.c=.lx)

# extra dynamic sources
DOBJECTS=

all:: $(PROGRAMS)
all:: $(PROGRAMS)

include $(LIBDIR)/Makefile.common
include $(LIBDIR)/Makefile.user

# Rule to compile .c files to .lx files
%.lx: %.c
$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)

.depend: *.c
$(MAKEDEPEND) *.c > .depend

Expand All @@ -41,7 +46,7 @@ realclean:: clean

.PHONY: all depend tag clean realclean

# depencencies
# dependencies
#
ifndef NODEPS
include .depend
Expand Down

0 comments on commit b84f02e

Please sign in to comment.