Make Linux and OS X aliases for Unix build, which will work for both.
This commit is contained in:
parent
d8d610b290
commit
d844c9dd1f
|
|
@ -1,6 +1,6 @@
|
||||||
#compiler flags: -Wall Warnings all, -g gdb debug markings,
|
#compiler flags: -Wall Warnings all, -g gdb debug markings,
|
||||||
CFLAGS=-Wall -O
|
CFLAGS=-Wall -O
|
||||||
LDFLAGS= -llua -lusb-1.0 -Lsource/lua -lm
|
LDFLAGS= -llua -lusb-1.0 -Lsource/lua
|
||||||
INCLUDE= -I ./include -I ../shared
|
INCLUDE= -I ./include -I ../shared
|
||||||
LDFLAGS_WINDOWS= -L ./winlib $(LDFLAGS)
|
LDFLAGS_WINDOWS= -L ./winlib $(LDFLAGS)
|
||||||
LDFLAGS_UNIX= -lm $(LDFLAGS)
|
LDFLAGS_UNIX= -lm $(LDFLAGS)
|
||||||
|
|
@ -20,6 +20,8 @@ DEPS=$(OBJECTS:.o=.d)
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
$(CC) $(CFLAGS) $(INCLUDE) -o $@ -c $<
|
$(CC) $(CFLAGS) $(INCLUDE) -o $@ -c $<
|
||||||
|
|
||||||
|
.PHONY: clean linux osx
|
||||||
|
|
||||||
# TODO: Pass through platform when building liblua.
|
# TODO: Pass through platform when building liblua.
|
||||||
liblua:
|
liblua:
|
||||||
$(MAKE) -C source/lua a
|
$(MAKE) -C source/lua a
|
||||||
|
|
@ -35,8 +37,9 @@ all: liblua $(DEPS) $(OBJECTS)
|
||||||
unix: liblua $(DEPS) $(OBJECTS)
|
unix: liblua $(DEPS) $(OBJECTS)
|
||||||
$(CC) $(INCLUDE) $(OBJECTS) -o $(TARGET) $(CFLAGS) $(LDFLAGS_UNIX)
|
$(CC) $(INCLUDE) $(OBJECTS) -o $(TARGET) $(CFLAGS) $(LDFLAGS_UNIX)
|
||||||
|
|
||||||
linux:
|
# Convienience in case its not clear Unix really means not-Windows.
|
||||||
gcc source/inlprog.c source/usb_operations.c -o inlretro -lusb-1.0 -lm -L lua include
|
linux: unix
|
||||||
|
macosx: unix
|
||||||
|
|
||||||
# "make debug" will build program with debug print messages
|
# "make debug" will build program with debug print messages
|
||||||
# -DDEBUG show debug logs
|
# -DDEBUG show debug logs
|
||||||
|
|
@ -49,7 +52,7 @@ unixdebug: CFLAGS += -DDEBUG -g
|
||||||
unixdebug: unix
|
unixdebug: unix
|
||||||
|
|
||||||
#clean on unix and windows(.exe)
|
#clean on unix and windows(.exe)
|
||||||
.PHONY: clean
|
|
||||||
clean:
|
clean:
|
||||||
$(MAKE) -C source/lua clean
|
$(MAKE) -C source/lua clean
|
||||||
rm -f $(TARGET) $(TARGET).exe $(OBJECTS) $(DEPS) $(LUAOBJ) source/lua/liblua.a
|
rm -f $(TARGET) $(TARGET).exe $(OBJECTS) $(DEPS) $(LUAOBJ) source/lua/liblua.a
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue