2013-01-17 13:06:51 +01:00
|
|
|
# Part of Grbl Simulator
|
|
|
|
#
|
|
|
|
# Copyright (c) 2012 Jens Geisler
|
|
|
|
#
|
|
|
|
# Grbl is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# Grbl is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with Grbl. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2014-07-10 19:01:03 +02:00
|
|
|
# PLATFORM = WINDOWS
|
|
|
|
PLATFORM = LINUX
|
2014-07-04 17:14:54 +02:00
|
|
|
|
2014-07-04 22:43:52 +02:00
|
|
|
OBJECTS = main.o simulator.o serial.o ../main.o ../protocol.o ../planner.o ../settings.o ../print.o ../nuts_bolts.o eeprom.o ../serial.o avr/pgmspace.o avr/interrupt.o avr/io.o util/delay.o util/floatunsisf.o ../stepper.o ../gcode.o ../spindle_control.o ../motion_control.o ../limits.o ../report.o ../coolant_control.o ../probe.o ../system.o platform_$(PLATFORM).o
|
2013-01-17 13:06:51 +01:00
|
|
|
CLOCK = 16000000
|
2013-01-18 17:22:42 +01:00
|
|
|
EXE_NAME = grbl_sim.exe
|
2014-07-04 17:14:54 +02:00
|
|
|
COMPILE = $(CC) -Wall -g -DF_CPU=$(CLOCK) -include config.h -I. -DPLAT_$(PLATFORM)
|
|
|
|
LINUX_LIBRARIES = -lrt -pthread
|
2014-07-05 05:21:19 +02:00
|
|
|
WINDOWS_LIBRARIES =
|
2013-01-17 13:06:51 +01:00
|
|
|
# symbolic targets:
|
|
|
|
all: main
|
|
|
|
|
|
|
|
new: clean main
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(EXE_NAME) $(OBJECTS)
|
|
|
|
|
|
|
|
# file targets:
|
|
|
|
main: $(OBJECTS)
|
2014-07-05 05:21:19 +02:00
|
|
|
$(COMPILE) -o $(EXE_NAME) $(OBJECTS) -lm $($(PLATFORM)_LIBRARIES)
|
2013-01-17 13:06:51 +01:00
|
|
|
|
|
|
|
%.o: %.c
|
2014-07-04 17:14:54 +02:00
|
|
|
$(COMPILE) -c $< -o $@
|
2013-01-18 17:22:42 +01:00
|
|
|
|
2013-01-17 13:06:51 +01:00
|
|
|
../planner.o: ../planner.c
|
2013-01-18 17:22:42 +01:00
|
|
|
$(COMPILE) -include planner_inject_accessors.c -c $< -o $@
|
|
|
|
|
2014-07-04 17:14:54 +02:00
|
|
|
../serial.o: ../serial.c
|
|
|
|
$(COMPILE) -include serial_hooks.h -c $< -o $@
|
|
|
|
|
|
|
|
../main.o: ../main.c
|
|
|
|
$(COMPILE) -include rename_main.h -c $< -o $@
|
|
|
|
|
2013-01-18 17:22:42 +01:00
|
|
|
|